--- a/2048.html Sun Sep 07 00:33:47 2014 +0300
+++ b/2048.html Sun Sep 07 03:33:33 2014 +0300
@@ -80,6 +80,7 @@
<button id="up">up</button>
<button id="down">down</button>
<button id="right">right</button>
+ <button id="test">test</button>
</div>
<h1>AI</h1>
<div>
@@ -205,6 +206,11 @@
}
return false;
});
+
+ document.getElementById("test").addEventListener("click", function() {
+ console.log("x1: %o", ui.brdEngine);
+ board.move.replaceByBoardJS(ui.brdEngine);
+ });
ui.message = {};
var messageDom = document.getElementById("message-area");