Connect4
Play a game of Connect4 against Artificial Intelligence!
API KEY REQURIED
POST /connect4
POST /connect4 - ai (REQUIRED): Specifies ("🔴" or "🟡") of the AI opponent.
ai (REQUIRED): Specifies ("🔴" or "🟡") of the AI opponent.- board (REQUIRED): Current state of the board. It is an array of strings, where each string represents a cell on the board. The array needs 42 elements.
board (REQUIRED): Current state of the board. It is an array of strings, where each string represents a cell on the board. The array needs 42 elements.- difficulty (REQUIRED): Specifies the difficulty level of the AI opponent. Valid values are "easy", "medium", or "hard".
difficulty (REQUIRED): Specifies the difficulty level of the AI opponent. Valid values are "easy", "medium", or "hard".CODE 200: (OBJECT)
CODE 200: (OBJECT){
"status": "success",
"updatedboard": "['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '🔴', '', '', '', '', '', '', '', '', '', '', '', '', '']"
}CODE 400: (OBJECT)
CODE 400: (OBJECT){ "status": "fatal", "error": "error message" } Last updated