summaryrefslogtreecommitdiff
path: root/common.js
diff options
context:
space:
mode:
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(){