projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Antiking v1
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
fad1853
..
29b3af6
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-750,12
+750,13
@@
export const ChessRules = class ChessRules {
// What are the king moves from square x,y ?
getPotentialKingMoves(sq) {
// Initialize with normal moves
// What are the king moves from square x,y ?
getPotentialKingMoves(sq) {
// Initialize with normal moves
-
cons
t moves = this.getSlideNJumpMoves(
+
le
t moves = this.getSlideNJumpMoves(
sq,
V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
"oneStep"
);
sq,
V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
"oneStep"
);
- return moves.concat(this.getCastleMoves(sq));
+ if (V.HasCastle) moves = moves.concat(this.getCastleMoves(sq));
+ return moves;
}
getCastleMoves([x, y]) {
}
getCastleMoves([x, y]) {