projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Minixiangqi, fix a few typos
[vchess.git]
/
client
/
src
/
variants
/
Progressive1.js
diff --git
a/client/src/variants/Progressive1.js
b/client/src/variants/Progressive1.js
index
4f69ee9
..
43c7c4d
100644
(file)
--- a/
client/src/variants/Progressive1.js
+++ b/
client/src/variants/Progressive1.js
@@
-2,6
+2,7
@@
import { ChessRules } from "@/base_rules";
import { randInt } from "@/utils/alea";
export class Progressive1Rules extends ChessRules {
import { randInt } from "@/utils/alea";
export class Progressive1Rules extends ChessRules {
+
static get HasEnpassant() {
return false;
}
static get HasEnpassant() {
return false;
}
@@
-28,7
+29,7
@@
export class Progressive1Rules extends ChessRules {
}
play(move) {
}
play(move) {
- move.flags = JSON.stringify(this.aggregateFlags());
+
if (V.HasFlags)
move.flags = JSON.stringify(this.aggregateFlags());
const color = this.turn;
const oppCol = V.GetOppCol(color);
move.turn = [color, this.subTurn];
const color = this.turn;
const oppCol = V.GetOppCol(color);
move.turn = [color, this.subTurn];
@@
-108,4
+109,5
@@
export class Progressive1Rules extends ChessRules {
for (let i=res.length - 1; i>= 0; i--) this.undo(res[i]);
return res;
}
for (let i=res.length - 1; i>= 0; i--) this.undo(res[i]);
return res;
}
+
};
};