X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FHex%2Fclass.js;h=05200bed65b11ed9599c02c21999c62965f7309c;hb=b98feb3f6bb7e03319474f7a032e296750eb179f;hp=774de17be6c51b081b7158724880948612c35691;hpb=dc10e429231932c19da6d1ff2ce98c7a042829ab;p=xogo.git diff --git a/variants/Hex/class.js b/variants/Hex/class.js index 774de17..05200be 100644 --- a/variants/Hex/class.js +++ b/variants/Hex/class.js @@ -66,7 +66,7 @@ export default class HexRules extends AbstractClickFillRules { new PiPo({ x: coords.x, y: coords.y, - c: C.GetOppCol(this.turn), + c: C.GetOppTurn(this.turn), p: 'p' }) ); @@ -168,11 +168,11 @@ export default class HexRules extends AbstractClickFillRules { play(move) { this.playOnBoard(move); this.movesCount++; - this.turn = C.GetOppCol(this.turn); + this.turn = C.GetOppTurn(this.turn); } getCurrentScore() { - const oppCol = C.GetOppCol(this.turn); + const oppCol = C.GetOppTurn(this.turn); // Search for connecting path of opp color: let explored = {}, component; let min, max; @@ -187,7 +187,7 @@ export default class HexRules extends AbstractClickFillRules { max = z; explored[index] = true; component[index] = true; - for (let [dx, dy] of super.pieces()['k'].moves[0].steps) { + for (let [dx, dy] of super.pieces()['k'].both[0].steps) { const [nx, ny] = [x + dx, y + dy]; const nidx = getIndex(nx, ny); if (