X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=85f63a2a8d6e3837647a4e99bfe06de110bae852;hp=7949d7f605d3856c07db605471d5245bca395481;hb=a13cbc0f2c8cf46c0584118a11af9e3cd6bbdcb9;hpb=b91392511d5df54b0e3cd5fcf439471cc6767804 diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 7949d7f6..85f63a2a 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -357,9 +357,9 @@ export const ChessRules = class ChessRules { for (let indexInRow = 0; indexInRow < rows[i].length; indexInRow++) { const character = rows[i][indexInRow]; const num = parseInt(character); + // If num is a number, just shift j: if (!isNaN(num)) j += num; - //just shift j - //something at position i,j + // Else: something at position i,j else board[i][j++] = V.fen2board(character); } }