projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Dice chess
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
e0353e8
..
e70b9de
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-1202,10
+1202,8
@@
export const ChessRules = class ChessRules {
piece = move.appear[0].p;
// Update king position + flags
piece = move.appear[0].p;
// Update king position + flags
- if (piece == V.KING && move.appear.length > 0) {
- this.kingPos[c][0] = move.appear[0].x;
- this.kingPos[c][1] = move.appear[0].y;
- }
+ if (piece == V.KING && move.appear.length > 0)
+ this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
if (V.HasCastle) this.updateCastleFlags(move, piece);
}
if (V.HasCastle) this.updateCastleFlags(move, piece);
}