|
@@ -63,21 +63,6 @@ class Game(db.Model):
|
|
|
self.linked_game = linked_game
|
|
|
db.session.commit()
|
|
|
|
|
|
- def to_dict(self):
|
|
|
- return {
|
|
|
- "gameId": self.game_id,
|
|
|
- "timer": self.timer,
|
|
|
- "rounds": self.rounds,
|
|
|
- "coords": {
|
|
|
- str(c.round_number): {
|
|
|
- "lat": c.latitude,
|
|
|
- "lng": c.longitude,
|
|
|
- } for c in self.coordinates
|
|
|
- },
|
|
|
- "players": [p.to_dict() for p in self.players],
|
|
|
- "linkedGame": self.linked_game,
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
class Player(db.Model):
|
|
|
player_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|