import random
def main(get_playerchoice, get_compchoice):
play_again = 'yes'
while play_again == 'yes':
get_playerchoice = player_choice()
get_compchoice = computer_choice()
winner = winner_status(player_count, tie-count, computer_count)
play_again = raw_input ('Do you wanna play again? Enter yes or press any other key: ')
print 'Computer wins ', computer_count
print 'Player wins ', player_count
print 'tie ', tie_count
def get_compchoice():
computer_choice = random.randint(1, 3)
return computer_choice
def get_playerchoice():
player_choice = input ('Enter a number between 1 and 3: ')
while player_choice != (1,2,3):
print 'Number must be between 1 and 3'
player_choice = input ('Enter a number between 1 and 3: ')
else:
return player__choice
def determine_winner(computer_choice, player_choice):
if computer_choice == 1 and player_choice == 2:
winner = player
if computer_choice == 2 and player_choice == 3:
winner = player
if computer_choice == 3 and player_choice == 1:
winner = player
else:
winner = computer
else:
winner = computer
else:
winner = computer
return winner
def winner_status(winner):
if winner == player_count:
player_count += 1
if winner == computer_count:
computer_count += 1
if winner == tie_count:
tie_count += 1
return player_count, tie_count, computer_count