projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt to fix Convert variant
[vchess.git]
/
client
/
src
/
variants
/
Shogi.js
diff --git
a/client/src/variants/Shogi.js
b/client/src/variants/Shogi.js
index
6c522dc
..
9104ed9
100644
(file)
--- a/
client/src/variants/Shogi.js
+++ b/
client/src/variants/Shogi.js
@@
-3,6
+3,7
@@
import { ArrayFun } from "@/utils/array";
import { sample, shuffle } from "@/utils/alea";
export class ShogiRules extends ChessRules {
import { sample, shuffle } from "@/utils/alea";
export class ShogiRules extends ChessRules {
+
static get HasFlags() {
return false;
}
static get HasFlags() {
return false;
}
@@
-15,6
+16,10
@@
export class ShogiRules extends ChessRules {
return true;
}
return true;
}
+ get showFirstTurn() {
+ return true;
+ }
+
static get Notoodark() {
return true;
}
static get Notoodark() {
return true;
}
@@
-307,7
+312,7
@@
export class ShogiRules extends ChessRules {
case V.LANCE:
return this.getPotentialLanceMoves([x, y]);
case V.KING:
case V.LANCE:
return this.getPotentialLanceMoves([x, y]);
case V.KING:
- return
this
.getPotentialKingMoves([x, y]);
+ return
super
.getPotentialKingMoves([x, y]);
case V.P_ROOK:
return this.getPotentialDragonMoves([x, y]);
case V.P_BISHOP:
case V.P_ROOK:
return this.getPotentialDragonMoves([x, y]);
case V.P_BISHOP:
@@
-446,14
+451,6
@@
export class ShogiRules extends ChessRules {
);
}
);
}
- getPotentialKingMoves(sq) {
- return this.getSlideNJumpMoves(
- sq,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- { oneStep: true }
- );
- }
-
isAttacked(sq, color) {
return (
this.isAttackedByPawn(sq, color) ||
isAttacked(sq, color) {
return (
this.isAttackedByPawn(sq, color) ||
@@
-656,4
+653,5
@@
export class ShogiRules extends ChessRules {
)
);
}
)
);
}
+
};
};