Strategická: Rozšíření api o počet vstupu

This commit is contained in:
Jiří Kalvoda 2022-09-23 00:04:28 +02:00
parent b6b062f2c2
commit a734bde81d
2 changed files with 2 additions and 0 deletions

View file

@ -30,6 +30,7 @@ GET na `/api/state?game=<jmeno_hry>&token=<token>&min_round=<min_round>`
status: "ok"
round: <int> # Kolikáté je aktuální kolo (na počátku 0)
team_id: <int>
teams_count: <int>
time_to_response: <Optional[int]> # None v případě, že ho neznáme
state:
{

View file

@ -101,6 +101,7 @@ def api_state():
"status": "ok",
"round": state.round,
"team_id": team_id,
"teams_count": game.teams_count,
"time_to_response": time_to_end,
"state": game.get_logic().personalize_state(state.get_state(), team_id, state.round),
}