X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=variants%2FAlice%2Fclass.js;h=e6d37b2fd906f77d5f477894a018fb7a733e5340;hp=e755b56ba3fdf180281e8c7c7dbb19120c91aa71;hb=f3e90e30b6e7ff416afe288bc9dd865e5daf9860;hpb=a548cb4e3ad8099e977da9bb4a4184973beb56e3 diff --git a/variants/Alice/class.js b/variants/Alice/class.js index e755b56..e6d37b2 100644 --- a/variants/Alice/class.js +++ b/variants/Alice/class.js @@ -1,5 +1,5 @@ import ChessRules from "/base_rules.js"; -import { ArrayFun } from "/utils/array.js"; +import {ArrayFun} from "/utils/array.js"; export default class AliceRules extends ChessRules { @@ -105,7 +105,7 @@ export default class AliceRules extends ChessRules { filterValid(moves) { const color = this.turn; const oppCol = C.GetOppCol(color); - const kingPos = this.searchKingPos(color); + const kingPos = this.searchKingPos(color)[0]; const kingPiece = this.getPiece(kingPos[0], kingPos[1]); return super.filterValid(moves).filter(m => { // A move must also be legal on the board it is played: