projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Titan Chess
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
df15026
..
f7a2fee
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-139,6
+139,10
@@
export const ChessRules = class ChessRules {
static get IgnoreRepetition() {
return false;
}
static get IgnoreRepetition() {
return false;
}
+ loseOnRepetition() {
+ // In some variants, result depends on the position:
+ return V.LoseOnRepetition;
+ }
// At some stages, some games could wait clicks only:
onlyClick() {
// At some stages, some games could wait clicks only:
onlyClick() {
@@
-765,9
+769,8
@@
export const ChessRules = class ChessRules {
if (!!promotions) finalPieces = promotions;
else if (!!V.PawnSpecs.promotions) finalPieces = V.PawnSpecs.promotions;
}
if (!!promotions) finalPieces = promotions;
else if (!!V.PawnSpecs.promotions) finalPieces = V.PawnSpecs.promotions;
}
- let tr = null;
for (let piece of finalPieces) {
for (let piece of finalPieces) {
- tr = (piece != V.PAWN ? { c: color, p: piece } : null);
+
const
tr = (piece != V.PAWN ? { c: color, p: piece } : null);
moves.push(this.getBasicMove([x1, y1], [x2, y2], tr));
}
}
moves.push(this.getBasicMove([x1, y1], [x2, y2], tr));
}
}