js13kgames2015-reverse/src/helpers.js

22 lines
345 B
JavaScript
Raw Normal View History

2015-08-25 09:16:58 +02:00
class Helper {
static random_number(min, max) {
return Math.floor((Math.random() * max) + min);
}
}
class DOMNode {
constructor(node) {
this.node = node;
}
node() {
return this.node;
}
}
class DOM {
static s(selector) {
return new DOMNode(document.querySelector(selector));
}
}