}
static ParseFen(fen) {
- return Object.assign({}, ChessRules.ParseFen(fen), {
- cmove: fen.split(" ")[4]
- });
+ return Object.assign(
+ ChessRules.ParseFen(fen),
+ { cmove: fen.split(" ")[4] }
+ );
}
static IsGoodFen(fen) {
getCurrentScore() {
const color = this.turn;
const kp = this.kingPos[color];
- if (color == "w" && kp[0] == 0)
- return "0-1";
- if (color == "b" && kp[0] == V.size.x - 1)
- return "1-0";
+ if (color == "w" && kp[0] == 0) return "0-1";
+ if (color == "b" && kp[0] == V.size.x - 1) return "1-0";
// King is not on the opposite edge: game not over
return "*";
}