X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=base_rules.js;h=7dc134d0a8b0cfadc2b38a346f42597ca032fd2d;hb=10c9010b3b04915e132b6b3820f2f19c9ea6dcf0;hp=d609a5609fcf16ab86d8b23a4072fde25225eb9f;hpb=0cef7bb4f72046ce60db408bfb76103428e2c15a;p=xogo.git diff --git a/base_rules.js b/base_rules.js index d609a56..7dc134d 100644 --- a/base_rules.js +++ b/base_rules.js @@ -219,6 +219,7 @@ export default class ChessRules { const s = FenUtil.setupPieces( ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'], { + randomness: this.options["randomness"], between: {p1: 'k', p2: 'r'}, diffCol: ['b'], flags: ['r'] @@ -556,7 +557,7 @@ export default class ChessRules { chessboard.style.top = spaceTop + "px"; // Give sizes instead of recomputing them, // because chessboard might not be drawn yet. - this.setupPieces({ + this.setupVisualPieces({ width: cbWidth, height: cbHeight, x: spaceLeft, @@ -596,7 +597,7 @@ export default class ChessRules { return board; } - setupPieces(r) { + setupVisualPieces(r) { let chessboard = document.getElementById(this.containerId).querySelector(".chessboard"); if (!r)