projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix and complete Apocalypse variant
[vchess.git]
/
client
/
src
/
variants
/
Hidden.js
diff --git
a/client/src/variants/Hidden.js
b/client/src/variants/Hidden.js
index
79c3dfb
..
2fcab24
100644
(file)
--- a/
client/src/variants/Hidden.js
+++ b/
client/src/variants/Hidden.js
@@
-2,7
+2,7
@@
import { ChessRules, PiPo, Move } from "@/base_rules";
import { ArrayFun } from "@/utils/array";
import { randInt } from "@/utils/alea";
import { ArrayFun } from "@/utils/array";
import { randInt } from "@/utils/alea";
-export c
onst VariantRules = c
lass HiddenRules extends ChessRules {
+export class HiddenRules extends ChessRules {
static get HasFlags() {
return false;
}
static get HasFlags() {
return false;
}
@@
-50,7
+50,7
@@
export const VariantRules = class HiddenRules extends ChessRules {
}
static get PIECES() {
}
static get PIECES() {
- return ChessRules.PIECES.concat(Object.
values(V.HIDDEN_
CODE));
+ return ChessRules.PIECES.concat(Object.
keys(V.HIDDEN_DE
CODE));
}
// Pieces can be hidden :)
}
// Pieces can be hidden :)
@@
-143,16
+143,6
@@
export const VariantRules = class HiddenRules extends ChessRules {
return mv;
}
return mv;
}
- // What are the king moves from square x,y ?
- getPotentialKingMoves(sq) {
- // No castling:
- return this.getSlideNJumpMoves(
- sq,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep"
- );
- }
-
filterValid(moves) {
return moves;
}
filterValid(moves) {
return moves;
}