projects
/
xogo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3a081a0
)
Fix typo
author
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 7 Jul 2022 22:57:46 +0000
(
00:57
+0200)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 7 Jul 2022 22:57:46 +0000
(
00:57
+0200)
base_rules.js
patch
|
blob
|
blame
|
history
diff --git
a/base_rules.js
b/base_rules.js
index
88197ea
..
2d08bd6
100644
(file)
--- a/
base_rules.js
+++ b/
base_rules.js
@@
-2340,14
+2340,13
@@
export default class ChessRules {
}
postPlay(move) {
}
postPlay(move) {
- const color = this.turn;
if (this.options["dark"])
this.updateEnlightened();
if (this.options["teleport"]) {
if (
this.subTurnTeleport == 1 &&
move.vanish.length > move.appear.length &&
if (this.options["dark"])
this.updateEnlightened();
if (this.options["teleport"]) {
if (
this.subTurnTeleport == 1 &&
move.vanish.length > move.appear.length &&
- move.vanish[1].c ==
color
+ move.vanish[1].c ==
this.turn
) {
const v = move.vanish[move.vanish.length - 1];
this.captured = {x: v.x, y: v.y, c: v.c, p: v.p};
) {
const v = move.vanish[move.vanish.length - 1];
this.captured = {x: v.x, y: v.y, c: v.c, p: v.p};
@@
-2362,7
+2361,7
@@
export default class ChessRules {
tryChangeTurn(move) {
if (this.isLastMove(move)) {
tryChangeTurn(move) {
if (this.isLastMove(move)) {
- this.turn = C.GetOppCol(
color
);
+ this.turn = C.GetOppCol(
this.turn
);
this.movesCount++;
this.subTurn = 1;
}
this.movesCount++;
this.subTurn = 1;
}