summaryrefslogtreecommitdiff
path: root/common.js
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-12-11 20:16:23 +0100
committertomsmeding <hallo@tomsmeding.nl>2015-12-11 20:16:23 +0100
commit9d2137af1be2ab47f18aa33e8e9c6a41da421c79 (patch)
treeeedf3b8f2b83093c9fb059e70776f279420dc400 /common.js
parent1954ed67ef61c509560418a9d2da58083b822996 (diff)
things
Diffstat (limited to 'common.js')
-rw-r--r--common.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/common.js b/common.js
index e77db07..7f5bd6a 100644
--- a/common.js
+++ b/common.js
@@ -1,7 +1,11 @@
-var W=8,H=9;
-
if(typeof module=="undefined")module=false; //hack to support client-side importing
+var W=8,H=9;
+if(module){
+ module.exports.W=W;
+ module.exports.H=H;
+}
+
if(module)module.exports["emptyboard"]=emptyboard;
function emptyboard(){
return new Array(H).fill(0).map(function(){