Comment by teraflop
I guess it's just a display bug, then? Though it's hard to imagine what kind of bug would lead the game state and the visual representation to get out of sync in that particular way.
I guess it's just a display bug, then? Though it's hard to imagine what kind of bug would lead the game state and the visual representation to get out of sync in that particular way.
My guess is they only remove captured pieces on the moved-to square (maybe relying on an implicit capture by overwriting an array entry). This is probably easier than actually tracking pieces that get captured.
The game is likely in javascript but because of this bug we know it's not using React because with React the programmer doesn't update the view, React does.
They're probably using an OSS chess engine in something like C++, but using HTML/CSS/JS for the interface. 90% moves could be represented by a chess board as a 2D array, checking the engine accepts it as a valid move, and then replacing what's on that square be it empty space or a now captured piece. Castling, pawn promotion, and en passant are the edge cases with en passant being the most obscure.