projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A few fixes (for updateCastleFlags()) + add Madhouse and Pocketknight variants
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
d219f78
..
9ee506e
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-1169,8
+1169,8
@@
export const ChessRules = class ChessRules {
this.postPlay(move);
}
this.postPlay(move);
}
- updateCastleFlags(move, piece) {
- const c = V.GetOppCol(this.turn);
+ updateCastleFlags(move, piece
, color
) {
+ const c =
color ||
V.GetOppCol(this.turn);
const firstRank = (c == "w" ? V.size.x - 1 : 0);
// Update castling flags if rooks are moved
const oppCol = this.turn;
const firstRank = (c == "w" ? V.size.x - 1 : 0);
// Update castling flags if rooks are moved
const oppCol = this.turn;