Chess API
Stateful chess API. Enter single moves and get the computer's move back.
Moves are in the format e2e4. The API returns the computer's move in response. Time is how long the computer may think for, in seconds. Maximum of 30 seconds.
Games are stateful with regards to the ip address querying it - one game at a time per ip.
Example of direct API access: http://ehopkinson.com/cgi-bin/chessbot/chess?move=e2e4
Special commands:
- clear - Clear the current game and start a new board, white to move. Returns "cleared".
- back - Take back the last move. Returns "undid e2e4" or "cleared" if no moves left.
- wwyd - "What would you do?" - ask the computer to play this turn. Useful if you want the computer to start.
- history - Output the entire move history so far without making a move.
- status - Output the status of the game in the format "status move 4 white to move".
- moves - Shows the list of valid moves prefixed with "validmoves".
- fen - Output the current chessboard in Forsyth-Edwards Notation (FEN) prefixed with "fen".
- board - Returns a URL to an image of the board in the current position prefixed with "board".