The AI used the chess.js library to handle the chess rules and nip-64 to store the game state. You can probably bypass the rules and cheat by manually updating and broadcasting the game state though.
https://www.npmjs.com/package/chess.js
https://github.com/nostr-protocol/nips/blob/master/64.md
