projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Maxima (immobilize kings too)
[vchess.git]
/
client
/
src
/
variants
/
Eightpieces.js
diff --git
a/client/src/variants/Eightpieces.js
b/client/src/variants/Eightpieces.js
index
c380610
..
927530c
100644
(file)
--- a/
client/src/variants/Eightpieces.js
+++ b/
client/src/variants/Eightpieces.js
@@
-167,11
+167,11
@@
export class EightpiecesRules extends ChessRules {
}
}
}
}
- static GenRandInitFen(
randomnes
s) {
- if (randomness == 0)
+ static GenRandInitFen(
option
s) {
+ if (
options.
randomness == 0)
return "jfsqkbnr/pppppppp/8/8/8/8/PPPPPPPP/JDSQKBNR w 0 ahah - -";
return "jfsqkbnr/pppppppp/8/8/8/8/PPPPPPPP/JDSQKBNR w 0 ahah - -";
- const baseFen = ChessRules.GenRandInitFen(
randomnes
s);
+ const baseFen = ChessRules.GenRandInitFen(
option
s);
const fenParts = baseFen.split(' ');
const posParts = fenParts[0].split('/');
const fenParts = baseFen.split(' ');
const posParts = fenParts[0].split('/');
@@
-671,10
+671,7
@@
export class EightpiecesRules extends ChessRules {
getPotentialKingMoves(sq) {
const moves = this.getSlideNJumpMoves(
getPotentialKingMoves(sq) {
const moves = this.getSlideNJumpMoves(
- sq,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep"
- );
+ sq, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), 1);
return (
this.subTurn == 1
? moves.concat(this.getCastleMoves(sq))
return (
this.subTurn == 1
? moves.concat(this.getCastleMoves(sq))