Hex
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;
// All the pieces on the board that a player has put down. Player idx 0 tries
// to connect left to right (column = 0 to column = 10). Plyaer idx 1 tries
// to connect bottom to top (row = 0 to row = 10).
repeated Piece pieces = 2;
}message Piece {
// Row of the piece that has been placed.
int32 row = 1;
// Column of the piece that has been placed.
int32 column = 2;
// value is the player_idx who placed this piece, can be 0 or 1.
int32 value = 3;
}Action schema
Last updated
Was this helpful?