+ canIplay(side, [x, y]) {
+ return (
+ (this.subTurn == 1 && this.turn == side && this.getColor(x, y) == side) ||
+ (this.subTurn == 2 && x == this.sentryPos.x && y == this.sentryPos.y)
+ );
+ }
+
+ getPotentialMovesFrom([x,y]) {
+ // At subTurn == 2, jailers aren't effective (Jeff K)
+ if (this.subTurn == 1 && !!this.isImmobilized([x, y])) return [];
+ if (this.subTurn == 2) {
+ // Temporarily change pushed piece color.
+ // (Not using getPiece() because of lancers)
+ var oppCol = this.getColor(x, y);
+ var color = V.GetOppCol(oppCol);
+ var saveXYstate = this.board[x][y];
+ this.board[x][y] = color + this.board[x][y][1];
+ }
+ let moves = [];