Comment by DoctorOW

Comment by DoctorOW 5 hours ago

0 replies

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.