]> git.sesse.net Git - remoteglot-book/blobdiff - www/js/book.js
Add support for flipping the board.
[remoteglot-book] / www / js / book.js
index 7a4d7ee5e6dd6d25c26e77282aab1fc537100349..8785a3454cbb385079b99ee7b0577ee2c50c5d3a 100644 (file)
@@ -281,6 +281,11 @@ var set_includetransp = function(value) {
 }
 window['set_includetransp'] = set_includetransp;
 
+var set_flipboard = function(value) {
+       board.orientation(value ? 'black' : 'white');
+}
+window['set_flipboard'] = set_flipboard;
+
 var make_move = function(move, do_update) {
        var history = game.history({ verbose: true });
        if (move_override < history.length && history[move_override].san == move) {