To play GROT you have to sign in with GitHub account on GROT game server. After sign in you will get token that you have to register in game client.
Clone GROT client repository
git clone https://github.com/stxnext/grot-client
cd grot-client
Register your unique token in the client
python3 client.py register your-unique-token
python3 client.py play_devel
python3 client.py play_vs_bot
Create your onw room
python3 client.py new_room --max-players=10
Or find <room_id>
on /games.
Join game
python3 client.py join <room_id>
Wait for game start (when room is full or after X minutes or manually).
Room owner can start game manually
python3 client.py start <room_id>
Check results /games/room_id.
Sample response from the server that describe current game state (score, available moves, board state - points and arrows' direction).
{
"score": 0, # obtained points
"moves": 5, # available moves
"moved": [None, None], # your last choice [x, y]
"board": [
[
{
"points": 1,
"direction": "up",
"x": 0,
"y": 0,
},
{
"points": 0,
"direction": "down",
"x": 1,
"y": 0,
}
],
[
{
"points": 5,
"direction": "right",
"x": 0,
"y": 1,
},
{
"points": 0,
"direction": "left",
"x": 1,
"y": 1,
}
]
]
}