js13kgames2015-reverse/src/helpers.js
2015-08-26 12:16:49 +02:00

22 lines
345 B
JavaScript

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));
}
}