Skip to content

Commit

Permalink
Solved bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Forensor authored Mar 7, 2021
1 parent 3dd3b06 commit 21aad42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/amazons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class Amazons {
let counter: number = 0;
for (let j: number = 0; j < fen.split(' ')[0].split('/')[i].length; j++) {
if (isNaN(parseInt(fen.split(' ')[0].split('/')[i][j]))) {
if (fen.split(' ')[0].split('/')[i][j] === 'r' || fen.split(' ')[0].split('/')[i][j] === 'b') {
if (fen.split(' ')[0].split('/')[i][j] === 'r' || fen.split(' ')[0].split('/')[i][j] === 'b' || fen.split(' ')[0].split('/')[i][j] === 'x') {
counter += 1;
} else {
return false;
Expand Down Expand Up @@ -433,4 +433,4 @@ class Amazons {
private validSquare(square: string): boolean {
return /^[a-fA-F][1-6]$/.test(square);
}
}
}

0 comments on commit 21aad42

Please sign in to comment.