diff --git a/js/pacosako_ui.js b/js/pacosako_ui.js index 6a4cf89..21c2e2b 100644 --- a/js/pacosako_ui.js +++ b/js/pacosako_ui.js @@ -12,10 +12,8 @@ $(function (){ let cancelGameCallback = function() {}; let cancelMetaCallback = function() {}; - /* for debug */ - window.getCurrentGame = function() { return currentGame; } - window.getVisibleGame = function() { return visibleGame; } - function debug() { console.log.apply(console, arguments); } + //function debug() { console.log.apply(console, arguments); } + function debug() {} function pieceTypeCode(type) { if (type === PS.KING) { @@ -849,6 +847,17 @@ $(function (){ }); }); }, + + getCurrentGame: function() { return currentGame; }, + getVisibleGame: function() { return visibleGame; }, + setCurrentGame: function(game) { setCurrentBoard(game) }, + setVisibleGame: function(game) { visibleGame = game; renderBoard(); }, + refresh: function() { setCurrentBoard(currentGame); }, + renderBoard: renderBoard, + putState: putState, + putMeta: putMeta, + gun: gun, + PacoSakoUUID: PacoSakoUUID, }; });