def get_mutilator_target(player_data, targets): ''' Prompts for mutilatotion target and target area and returns a pair. ''' if logger.is_debug_mode(): return dbgio.get_mutilator_target(player_data) return rlio.get_mutilator_target(targets)
def get_police_target(player_data, targets): ''' Prompts for police interrogation and returns the chosen person's name. ''' if logger.is_debug_mode(): return dbgio.get_police_target(player_data) return rlio.get_police_target(targets)
def show_police_answer(player_data, target): ''' Alerts whether the person interrogated by the police is an assassin or not. ''' if logger.is_debug_mode(): return dbgio.show_police_answer(player_data, target) return rlio.show_police_answer(player_data, target)
def show_results(result, player_data): '''Gets all the game logs and shows them''' game_logs = result + '\n\n' game_logs += show_mafia(player_data) game_logs += show_town(player_data) game_logs += show_suicidal(player_data) if logger.is_debug_mode(): logger.log_info(game_logs) else: rlio.show_game_logs(game_logs)
def get_doctor_target(player_data, targets): ''' Prompts for doctor target and returns their name. ''' if logger.is_debug_mode(): return dbgio.get_doctor_target(player_data) return rlio.get_doctor_target(targets)
def get_assn_target(player_data, targets): ''' Prompts for assassination target and returns the result. ''' if logger.is_debug_mode(): return dbgio.get_assn_target(player_data) return rlio.get_assn_target(targets)
def get_lynched_name(can_vote, still_alive): ''' Prompts for name of player to lynch. ''' if logger.is_debug_mode(): return dbgio.get_lynched_name() return rlio.get_lynched_name(can_vote, still_alive)
def get_names_emails(role_list, player_cnt, player_data): ''' Prompts for player names and emails and returns a pair of arrays. ''' if logger.is_debug_mode(): return dbgio.get_names_emails(role_list, player_cnt, player_data) return rlio.get_names_emails(role_list, player_cnt, player_data)
def get_player_cnt(): ''' Prompts for number of players and returns the result. ''' if logger.is_debug_mode(): return dbgio.get_player_cnt() return rlio.get_player_cnt()
def reset_logs(): '''Resets logs in ui''' if logger.is_debug_mode(): print("Logs reseted\n") else: rlio.reset_logs()
def add_logs(text): '''Adds logs in ui''' if logger.is_debug_mode(): print(text) else: rlio.add_logs(text)
def show_scoreboard(player_names, target_round, scoreboard): ''' Shows players the scoreboard. ''' if logger.is_debug_mode(): dbgio.show_scoreboard(player_names, target_round, scoreboard) else: rlio.show_scoreboard(player_names, target_round, scoreboard)
def get_result(name, possible_results): ''' Prompts a player for their result that round. ''' if logger.is_debug_mode(): return dbgio.get_result(name, possible_results) return rlio.get_result(name, possible_results)
def get_bid(name, possible_bids): ''' Prompts a player for their bid. ''' if logger.is_debug_mode(): return dbgio.get_bid(name, possible_bids) return rlio.get_bid(name, possible_bids)
def get_names(player_cnt): ''' Prompts for player names and returns an array. ''' if logger.is_debug_mode(): return dbgio.get_names(player_cnt) return rlio.get_names(player_cnt)