projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix moveList + progress on game navigation system
[vchess.git]
/
public
/
javascripts
/
base_rules.js
diff --git
a/public/javascripts/base_rules.js
b/public/javascripts/base_rules.js
index
4b0b470
..
7db4cfd
100644
(file)
--- a/
public/javascripts/base_rules.js
+++ b/
public/javascripts/base_rules.js
@@
-1053,6
+1053,8
@@
class ChessRules
move.flags = JSON.stringify(this.aggregateFlags()); //save flags (for undo)
if (V.HasEnpassant)
this.epSquares.push( this.getEpSquare(move) );
move.flags = JSON.stringify(this.aggregateFlags()); //save flags (for undo)
if (V.HasEnpassant)
this.epSquares.push( this.getEpSquare(move) );
+ if (!move.color)
+ move.color = this.turn; //for interface
V.PlayOnBoard(this.board, move);
this.turn = V.GetOppCol(this.turn);
this.movesCount++;
V.PlayOnBoard(this.board, move);
this.turn = V.GetOppCol(this.turn);
this.movesCount++;