pieces[c][knight2Pos] = "n";
pieces[c][rook2Pos] = "r";
}
+ // Add turn + flags + enpassant
return (
pieces["b"].join("") +
"/pppppppp/8/8/8/8/PPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
" w 0 1111 -"
- ); //add turn + flags + enpassant
+ );
}
// "Parse" FEN: just return untransformed string data
// TODO: un-ambiguous notation (switch on piece type, check directions...)
getNotation(move) {
if (move.appear.length == 2 && move.appear[0].p == V.KING)
- //castle
+ // Castle
return move.end.y < move.start.y ? "0-0-0" : "0-0";
// Translate final square