return false;
}
- // Moves are revealed only when game ends
+ // Moves are revealed only when game ends, but are highlighted on board
static get ShowMoves() {
- return "none";
+ return "highlight";
}
static get HIDDEN_DECODE() {
return piece;
}
+ getPpath(b, color, score) {
+ if (Object.keys(V.HIDDEN_DECODE).includes(b[1])) {
+ // Supposed to be hidden.
+ if (score == "*" && (!color || color != b[0]))
+ return "Hidden/" + b[0] + "p";
+ // Else: condition OK to show the piece
+ return b[0] + V.HIDDEN_DECODE[b[1]];
+ }
+ // The piece is already not supposed to be hidden:
+ return b;
+ }
+
// Scan board for kings positions (no castling)
scanKingsRooks(fen) {
this.kingPos = { w: [-1, -1], b: [-1, -1] };
}
}
- getPpath(b, color, score) {
- if (Object.keys(V.HIDDEN_DECODE).includes(b[1])) {
- // Supposed to be hidden.
- if (score == "*" && (!color || color != b[0]))
- return "Hidden/" + b[0] + "p";
- // Else: condition OK to show the piece
- return b[0] + V.HIDDEN_DECODE[b[1]];
- }
- // The piece is already not supposed to be hidden:
- return b;
- }
-
getBasicMove([sx, sy], [ex, ey], tr) {
if (
tr &&
return moves;
}
+ // Ignore randomness here: placement is always random asymmetric
static GenRandInitFen() {
let pieces = { w: new Array(8), b: new Array(8) };
// Shuffle pieces + pawns on two first ranks