def record_roll(player, roll: 'Roll', game_id: str, is_winning_play: bool, roll_num: int): move = Move() # move.player_id = player.id # move.roll_id = roll.id move.game_id = game_id move.is_winning_play = is_winning_play move.roll_number = roll_num
def record_roll(player, roll: 'Roll', game_id: str, is_winning_play: bool, roll_num: int): session = session_factory.create_session() move = Move() move.player_id = player.id move.roll_id = roll.id move.game_id = game_id move.is_winning_play = is_winning_play move.roll_number = roll_num session.add(move) session.commit() session.close()