teraflop 15 hours ago

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.

  • DoctorOW 4 hours ago

    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.

  • throwaway38294 9 hours ago

    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.

  • dominicrose 6 hours ago

    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.