In case anyone’s wondering how I approached this as a programming problem, a quick trick is to not get drawn into writing a whole chessboard representation. Use a tool like pgn-extract to convert SAN moves (e.g. ”Nc3”) to long algebraic moves (e.g. ”Nb1c3”) - since we can safely assume all moves in the PGN are legal, this saves a lot of effort implementing the rules of chess (although you still have to handle castling and en passant carefully). » png-extract » SurvivingPieces

» quora.com


Published

Category

micropost

Contacto