aboutsummaryrefslogtreecommitdiff
path: root/api/game/random.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/game/random.py')
-rw-r--r--api/game/random.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/game/random.py b/api/game/random.py
index f57e4d6..09408e1 100644
--- a/api/game/random.py
+++ b/api/game/random.py
@@ -33,8 +33,8 @@ def index():
timestamp = int( time.time() * 1000 )
cursor.execute("update games set player_2_id = ?, status = \"in_progress\", timestamp = ? where game_id = ?", (user_id, timestamp, game_id))
connection.commit()
- games[game_id] = game(game_id, io)
- print("random.py")
- print(games)
+
+ players = cursor.execute("select player_1_id, player_2_id from games where game_id = ?", [game_id]).fetchone()
+ games[game_id] = game(game_id, io, players[0], players[1])
return { "id": game_id }, 200