Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
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)
Beispiel #6
0
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)
Beispiel #7
0
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)
Beispiel #8
0
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)
Beispiel #9
0
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()
Beispiel #10
0
def reset_logs():
    '''Resets logs in ui'''
    if logger.is_debug_mode():
        print("Logs reseted\n")
    else:
        rlio.reset_logs()
Beispiel #11
0
def add_logs(text):
    '''Adds logs in ui'''
    if logger.is_debug_mode():
        print(text)
    else:
        rlio.add_logs(text)
Beispiel #12
0
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)
Beispiel #13
0
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)
Beispiel #14
0
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)
Beispiel #15
0
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)