Connect Four
Game logic
Game state schema
message State {
// Required field to indicate the player who should be making the next move
// Values = 0 or 1
int32 player_turn_idx = 1;
/*
Array of size 42 initialized to -1, representing an empty 6 by 7 board.
The values of board can be -1, 0, or 1.
Placing a piece in index x will set the value of board[x] to the player's index.
Array is row major order from the bottom up:
• index 0 is bottom left
• index 6 is bottom right
• index 35 is top left
• index 41 is top right
*/
repeated int32 board = 2;
}Action schema
Last updated