|
@ -29,18 +29,10 @@ def game_step(game_id: int): |
|
|
for i in ses.query(db.Move).filter_by(game_id=game.game_id, round=old_round_id).all(): |
|
|
for i in ses.query(db.Move).filter_by(game_id=game.game_id, round=old_round_id).all(): |
|
|
moves[i.team_id] = i.get_move() |
|
|
moves[i.team_id] = i.get_move() |
|
|
|
|
|
|
|
|
print(old_state) |
|
|
|
|
|
print(moves) |
|
|
|
|
|
print(old_round_id) |
|
|
|
|
|
print() |
|
|
|
|
|
|
|
|
|
|
|
ses.commit() |
|
|
ses.commit() |
|
|
|
|
|
|
|
|
x, points = game.get_logic().step(old_state, moves, old_round_id) |
|
|
x, points = game.get_logic().step(old_state, moves, old_round_id) |
|
|
|
|
|
|
|
|
print(x) |
|
|
|
|
|
print(points) |
|
|
|
|
|
|
|
|
|
|
|
new_state = db.State(game_id=game.game_id, round=new_round_id, state=db.new_big_data(x), create_time=time) |
|
|
new_state = db.State(game_id=game.game_id, round=new_round_id, state=db.new_big_data(x), create_time=time) |
|
|
ses.add(new_state) |
|
|
ses.add(new_state) |
|
|
|
|
|
|
|
|