projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Pandemonium] Apply rules changes as given by the author
[vchess.git]
/
client
/
src
/
variants
/
Chakart.js
diff --git
a/client/src/variants/Chakart.js
b/client/src/variants/Chakart.js
index
e5473d7
..
5f20132
100644
(file)
--- a/
client/src/variants/Chakart.js
+++ b/
client/src/variants/Chakart.js
@@
-30,7
+30,7
@@
export class ChakartRules extends ChessRules {
return true;
}
return true;
}
- hoverHighlight(
x, y
) {
+ hoverHighlight(
[x, y]
) {
if (this.subTurn == 1) return false;
const L = this.firstMove.length;
const fm = this.firstMove[L-1];
if (this.subTurn == 1) return false;
const L = this.firstMove.length;
const fm = this.firstMove[L-1];
@@
-1422,7
+1422,7
@@
export class ChakartRules extends ChessRules {
let notation = undefined;
if (piece == V.PAWN) {
// Pawn move
let notation = undefined;
if (piece == V.PAWN) {
// Pawn move
- if (
move.vanish.length >= 2
) {
+ if (
this.board[move.end.x][move.end.y] != V.EMPTY
) {
// Capture
const startColumn = V.CoordToColumn(move.start.y);
notation = startColumn + "x" + finalSquare;
// Capture
const startColumn = V.CoordToColumn(move.start.y);
notation = startColumn + "x" + finalSquare;
@@
-1435,7
+1435,7
@@
export class ChakartRules extends ChessRules {
else {
notation =
piece.toUpperCase() +
else {
notation =
piece.toUpperCase() +
- (
move.vanish.length >= 2
? "x" : "") +
+ (
this.board[move.end.x][move.end.y] != V.EMPTY
? "x" : "") +
finalSquare;
}
if (!!move.end.effect) {
finalSquare;
}
if (!!move.end.effect) {