Go to file
2019-03-11 19:03:03 +01:00
.gitignore Initial commit 2019-03-07 10:29:35 +00:00
game_manager.py fixing registering process 2019-03-10 13:58:33 +01:00
LICENSE Initial commit 2019-03-07 10:29:35 +00:00
main.py ssl changes 2019-03-11 15:07:22 +01:00
README.md first server version 2019-03-10 00:29:52 +01:00
settings.py filled settings file 2019-03-11 19:03:03 +01:00

ultimate_tictactoe_server

a python server backend for ultimate tic-tac-toe.

communication with the web client is done by a (far from any standard and almost random) json protocol:

register as player and in game queue:

{
    "type": "register",
    "data": {
        "id": "<player_id>",
   		"name": "<player_name>"
    }
}

response:

{
    "type": "register_response",
    "data": {
        "success": true,
        "msg": "<additional info e.g. in case of error>"
    }
}

message from server that game started

{
    "type": "game_starts",
    "data": {
        "msg": "...",
        "opponent_name": "...",
        "is_first_move": true
    }
}

note: is_first_move indicates whether the player or it's opponent begins

move

{
    "type": "move",
    "data": {
        "sub_x": "...",
        "sub_y": "...",
        "x": "...",
        "y": "..."
    }
}

response:

{
    "type": "move_response",
    "data": {
        "success": true,
        "msg": "..."
    }
}

end game

{
    "type": "end_game",
    "data": {
        "msg": "..."
    }
}

(response?)