def display_start_tournament(msg): """ :param msg: message to be displayed """ indent_cushion() print(' Tournament Start! ') indent_cushion() m = Message.get_players(msg) print('\nPlayers: ' + m) #assuming for the time being that info will hold the specified game m = Message.get_info(msg) print('\nGame: ' + m)
def display_end_tournament(msg): """ :param msg: message to be displayed """ indent_cushion() print(' Tournament End! ') indent_cushion() #assuming for the time being that info will hold the winner of the tournament m = Message.get_info(msg) print('\nWinner: ' + m) indent_cushion() indent_cushion() print('\n') indent_cushion() indent_cushion()
def display_end_match(msg): """ :param msg: message to be displayed """ indent_cushion() print(' Match End! ') indent_cushion() m = Message.get_info(msg) #r is the winner #winnings is the number of times that r won if m[1] > m[2]: #player 1 won r = 'Player 1 ' winnings = m[1] else: #player 2 won r = 'Player 2 ' winnings = m[2] print('Winner: ' + r + '( ' + winnings + ' out of ' + (m[1] + m[2]) + ')')
def display_end_round(msg): """ :param msg: message to be displayed """ print('\nRound Results: ') m = Message.get_info(msg) #r is the winner of the round if m[2] == 0: r = 'Tied' elif m[2] == 1: #player 1 won r = 'Player 1 ' elif m[2] == 1: #player 2 won r = 'Player 2 ' print('Winner: ' + r) #find the moves that were played during this round moves = m[1] a = get_move(moves[1]) b = get_move(moves[2]) print(' Moves made: Player 1: ' + a + ' Player 2: ' + b)