X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=167be91fd5d1e4f6f8fee7ae4834d6eb4858b1dd;hb=156986e6b06dc5f0acd39860bd4fef6b030e263b;hp=1a4a32d96aaf61649580328802f2e906e143d505;hpb=8c267d0c700050831a10d0934df1d1606aa0d654;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 1a4a32d9..167be91f 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -966,7 +966,7 @@ export const ChessRules = class ChessRules { let potentialMoves = []; for (let i = 0; i < V.size.x; i++) { for (let j = 0; j < V.size.y; j++) { - if (this.getColor(i, j) == color) { + if (this.board[i][j] != V.EMPTY && this.getColor(i, j) == color) { Array.prototype.push.apply( potentialMoves, this.getPotentialMovesFrom([i, j])