X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=variants%2FAmbiguous%2Fclass.js;h=58458b6a52b80206c01b30d582fc9176b7f6c5c7;hp=6a001a6f795e94349a439f30b7e0946218332d7b;hb=65cf1690c6119c949e2ea8feba8835b6e90b79a2;hpb=e2be4b04faeac3fca5b292499bb70b98542e45ce diff --git a/variants/Ambiguous/class.js b/variants/Ambiguous/class.js index 6a001a6..58458b6 100644 --- a/variants/Ambiguous/class.js +++ b/variants/Ambiguous/class.js @@ -55,14 +55,10 @@ export default class AmbiguousRules extends ChessRules { return true; }) .map(m => { - if (m.vanish.length == 1) { - m.appear[0].c = 'a'; //a-color + if (m.vanish.length == 1) m.appear[0].p = V.GOAL; - } - else { + else m.appear[0].p = V.TARGET_CODE[m.vanish[1].p]; - m.appear[0].c = oppCol; - } m.vanish.shift(); return m; }) @@ -133,8 +129,8 @@ export default class AmbiguousRules extends ChessRules { 't': {"class": "target-queen", moves: []}, 'l': {"class": "target-king", moves: []} }; - return Object.assign( - { 'g': {"class": "target"} }, targets, super.pieces(color, x, y)); + return Object.assign({ 'g': {"class": "target", moves: []} }, + targets, super.pieces(color, x, y)); } atLeastOneMove() {