X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=base_rules.js;h=162fad0689d89e98426d1d0f0332543f011099d8;hb=7c03823594cef3ce6e8da7ac1d7d3504c73695a9;hp=cdce2a17cc02a968528aa85cb49d5e5673e2c376;hpb=0adfbdb55452c79532875beb8eed61b1ed4c6cd2;p=xogo.git diff --git a/base_rules.js b/base_rules.js index cdce2a1..162fad0 100644 --- a/base_rules.js +++ b/base_rules.js @@ -220,11 +220,13 @@ export default class ChessRules { ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'], { between: {p1: 'k', p2: 'r'}, - diffCol: ['b'] + diffCol: ['b'], + flags: ['r'] } ); return { - fen: s.b + "/pppppppp/8/8/8/8/PPPPPPPP/" + s.w, + fen: s.b.join("") + "/pppppppp/8/8/8/8/PPPPPPPP/" + + s.w.join("").toUpperCase(), o: {flags: s.flags} }; } @@ -356,9 +358,6 @@ export default class ChessRules { if (this.options[opt.variable] === undefined) this.options[opt.variable] = opt.defaut; }); - if (o.genFenOnly) - // This object will be used only for initial FEN generation - return; // Some variables this.playerColor = o.color; @@ -965,7 +964,7 @@ export default class ChessRules { // TODO: onpointerdown/move/up ? See reveal.js /controllers/touch.js } - // NOTE: not called if isDiagram, or genFenOnly + // NOTE: not called if isDiagram removeListeners() { let container = document.getElementById(this.containerId); this.windowResizeObs.unobserve(container);