Connection
Base URL, credentials and a reachable server.
Add a legal-move check to a turn-based board game. Try an occupied square, a move by the wrong player and a move after the game has ended, preserving the board on every rejection.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
if (game.finished || player !== game.turn) return game;
if (!insideBoard(cell) || game.board[cell] !== null) return game;
return applyLegalMove(game, cell);