projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Dobutsu, extend Align4
[xogo.git]
/
variants
/
Apocalypse
/
class.js
diff --git
a/variants/Apocalypse/class.js
b/variants/Apocalypse/class.js
index
1f7cc7a
..
3b735b1
100644
(file)
--- a/
variants/Apocalypse/class.js
+++ b/
variants/Apocalypse/class.js
@@
-68,7
+68,7
@@
export default class ApocalypseRules extends ChessRules {
return {
'p': {
"class": "pawn",
return {
'p': {
"class": "pawn",
-
moves
: [
+
both
: [
{
steps: [[pawnShift, 0], [pawnShift, -1], [pawnShift, 1]],
range: 1
{
steps: [[pawnShift, 0], [pawnShift, -1], [pawnShift, 1]],
range: 1
@@
-102,7
+102,7
@@
export default class ApocalypseRules extends ChessRules {
}
}
else {
}
}
else {
- const oppCol = C.GetOpp
Col
(this.getColor(x, y));
+ const oppCol = C.GetOpp
Turn
(this.getColor(x, y));
moves = super.getPotentialMovesFrom([x, y]).filter(m => {
// Remove pawn push toward own color (absurd)
return (
moves = super.getPotentialMovesFrom([x, y]).filter(m => {
// Remove pawn push toward own color (absurd)
return (
@@
-222,7
+222,7
@@
export default class ApocalypseRules extends ChessRules {
if (!res.wm || !res.bm)
return;
for (let c of ['w', 'b']) {
if (!res.wm || !res.bm)
return;
for (let c of ['w', 'b']) {
- const myMove = res[c + 'm'], oppMove = res[C.GetOpp
Col
(c) + 'm'];
+ const myMove = res[c + 'm'], oppMove = res[C.GetOpp
Turn
(c) + 'm'];
if (
// More general test than checking moves ends,
// because of potential pawn relocation
if (
// More general test than checking moves ends,
// because of potential pawn relocation
@@
-306,7
+306,7
@@
export default class ApocalypseRules extends ChessRules {
};
this.playVisual(revFirstMove);
}
};
this.playVisual(revFirstMove);
}
- this.turn = C.GetOpp
Col
(color);
+ this.turn = C.GetOpp
Turn
(color);
this.movesCount++;
this.subTurn = 1;
this.firstMove = null;
this.movesCount++;
this.subTurn = 1;
this.firstMove = null;