projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improvements; to be continuated
[vchess.git]
/
public
/
javascripts
/
base_rules.js
diff --git
a/public/javascripts/base_rules.js
b/public/javascripts/base_rules.js
index
8b8165a
..
7a42a38
100644
(file)
--- a/
public/javascripts/base_rules.js
+++ b/
public/javascripts/base_rules.js
@@
-956,11
+956,11
@@
class ChessRules
board[psq.x][psq.y] = psq.c + psq.p;
}
board[psq.x][psq.y] = psq.c + psq.p;
}
- //
Before
move is played, update variables + flags
+ //
After
move is played, update variables + flags
updateVariables(move)
{
const piece = move.vanish[0].p;
updateVariables(move)
{
const piece = move.vanish[0].p;
- const c =
move.vanish[0].c;
+ const c =
this.getOppCol(this.turn); //'move.vanish[0].c' doesn't work for Checkered
const firstRank = (c == "w" ? V.size.x-1 : 0);
// Update king position + flags
const firstRank = (c == "w" ? V.size.x-1 : 0);
// Update king position + flags