X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=4f1478e17680fd5dde812d2f66bcd81319ebaed2;hp=d5849f3bfbd0a2af05378d05917b7403540468de;hb=0ba6420d3515e278b34c29e5afa1e58f6e08e9eb;hpb=71ef1664983cd58db3c3bbfdf6cb7c362474e9a5 diff --git a/client/src/base_rules.js b/client/src/base_rules.js index d5849f3b..4f1478e1 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -467,7 +467,7 @@ export const ChessRules = class ChessRules { return { x: 8, y: 8 }; } - // Color of thing on suqare (i,j). 'undefined' if square is empty + // Color of thing on square (i,j). 'undefined' if square is empty getColor(i, j) { return this.board[i][j].charAt(0); } @@ -543,7 +543,7 @@ export const ChessRules = class ChessRules { //////////////////// // MOVES GENERATION - // All possible moves from selected square (assumption: color is OK) + // All possible moves from selected square getPotentialMovesFrom([x, y]) { switch (this.getPiece(x, y)) { case V.PAWN: