From 0c983c1d70b0694126f6c481c165978aaf08d4ff Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sun, 22 Mar 2020 23:57:26 -0500 Subject: [PATCH] disable debug output & add some items to the Admin object --- js/pacosako_ui.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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, }; });