Ejemplo n.º 1
0
 def update_collector(self, game_status_tmp: GameStatus = None):
     game_status_tmp.new_turn = self.__evaluate_next_player_by_turns(game_status_tmp)
     game_status_tmp.speakers = game_status_tmp.get_speakers()
     if game_status_tmp.all_players_did_move:
         game_status_tmp.turns_counter += 1
     if game_status_tmp.turns.max is not None:
         if game_status_tmp.turns_counter >= game_status_tmp.turns.max:
             game_status_tmp.status = Status.TERMINATE
             GameEndController.finished = True
     return game_status_tmp
Ejemplo n.º 2
0
 def update_collector(self, game_status_tmp: GameStatus = None):
     if game_status_tmp.last_interaction_move:
         game_status_tmp = game_status_tmp.assign_speaker_assign_listener()
         game_status_tmp.speakers = game_status_tmp.get_speakers()
         game_status_tmp.current_speaker = game_status_tmp.last_interaction_move.playerName
         game_status_tmp.set_last_move_by_name(game_status_tmp.last_interaction_move.moveName)
         game_status_tmp.past_moves.append(game_status_tmp.last_interaction_move)
         game_status_tmp.set_did_move_flag(game_status_tmp.current_speaker)
         game_status_tmp.remove_interaction_move_from_moves(game_status_tmp.last_interaction_move)
         game_status_tmp.initial_turn = False
         game_status_tmp.clear_init_moves_dicts()
     else:
         LoggingController.logger.warning(
             "game_status_tmp.last_interaction_move: None\n\tLast move could not be parsed")
         GameEndController.finished = True
     return game_status_tmp
Ejemplo n.º 3
0
 def update_collector(self, game_status_tmp: GameStatus = None):
     game_status_tmp.speakers = game_status_tmp.get_speakers()
     return game_status_tmp