Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- import os
- def menu():
- #Clear the screen, windows skrubs be needin' cls
- os.system('clear')
- print '**Rock Paper Sissors**\n\n1)Rock\n2)Paper\n3)Sissors'
- return
- while(True):
- menu()
- options = ('Rock', 'Paper', 'Sissors')
- cpu = randint(0, 2)
- try:
- player = int(raw_input('Input an option> '))
- except:
- print 'Have you been blazin\' it m8? It asked for numbers not letters!'
- raw_input('\nPress enter to continue...')
- continue
- #Glorious if statements!
- if ((player < 1) or (player > 3)):
- print 'You didn\'t put in valid input you fucking skrub 1v1 me'
- else:
- print '\nYou chose {}'.format(options[player - 1])
- if (cpu == 0):
- if (player == 1):
- print 'Computer chose: {}\nTie!'.format(options[cpu])
- elif (player == 2):
- print 'Computer chose: {}\nWin!'.format(options[cpu])
- elif (player == 3):
- print 'Computer chose: {}\nRek\'d!'.format(options[cpu])
- elif (cpu == 1):
- if (player == 1):
- print 'Computer chose: {}\nRek\'d!'.format(options[cpu])
- elif (player == 2):
- print 'Computer chose: {}\nTie!!'.format(options[cpu])
- elif (player == 3):
- print 'Computer chose: {}\nWin!'.format(options[cpu])
- elif (cpu == 2):
- if (player == 1):
- print 'Computer chose: {}\nWin!'.format(options[cpu])
- elif (player == 2):
- print 'Computer chose: {}\nRek\'d!!'.format(options[cpu])
- elif (player == 3):
- print 'Computer chose: {}\nTie!'.format(options[cpu])
- #Get yo errors outta here
- else:
- print 'Something went wrong'
- raw_input('\nPress enter to continue...')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement