projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo
[vchess.git]
/
client
/
src
/
variants
/
Alice.js
diff --git
a/client/src/variants/Alice.js
b/client/src/variants/Alice.js
index
a3d3ff4
..
61fcd01
100644
(file)
--- a/
client/src/variants/Alice.js
+++ b/
client/src/variants/Alice.js
@@
-72,7
+72,7
@@
export class AliceRules extends ChessRules {
if (['K','k','L','l'].includes(row[i])) kings[row[i]]++;
if (V.PIECES.includes(row[i].toLowerCase())) sumElts++;
else {
if (['K','k','L','l'].includes(row[i])) kings[row[i]]++;
if (V.PIECES.includes(row[i].toLowerCase())) sumElts++;
else {
- const num = parseInt(row[i]);
+ const num = parseInt(row[i]
, 10
);
if (isNaN(num)) return false;
sumElts += num;
}
if (isNaN(num)) return false;
sumElts += num;
}
@@
-101,7
+101,7
@@
export class AliceRules extends ChessRules {
this.kingPos["w"] = [i, k];
break;
default: {
this.kingPos["w"] = [i, k];
break;
default: {
- const num = parseInt(rows[i].charAt(j));
+ const num = parseInt(rows[i].charAt(j)
, 10
);
if (!isNaN(num)) k += num - 1;
}
}
if (!isNaN(num)) k += num - 1;
}
}
@@
-361,10
+361,9
@@
export class AliceRules extends ChessRules {
// Piece or pawn movement
let notation = piece.toUpperCase() + pawnMark + captureMark + finalSquare;
// Piece or pawn movement
let notation = piece.toUpperCase() + pawnMark + captureMark + finalSquare;
- if (["s", "p"].includes(piece) && !["s", "p"].includes(move.appear[0].p))
{
+ if (["s", "p"].includes(piece) && !["s", "p"].includes(move.appear[0].p))
// Promotion
notation += "=" + move.appear[0].p.toUpperCase();
// Promotion
notation += "=" + move.appear[0].p.toUpperCase();
- }
return notation;
}
};
return notation;
}
};