Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from dice import *
- def play_turn_human():
- a = roll()
- print '-->',a
- def play_turn_computer():
- b = roll()
- print '-->',b
- def play():
- print 'YOUR TURN'
- play_turn_human()
- print 'MY TURN'
- play_turn_computer()
- print '-' * 45
- def ask_user():
- print "Want a new try? (y=yes, n=no):"
- a = "y"
- b = "n"
- x = raw_input()
- if x == a:
- play()
- elif x == b:
- print "Quitting game."
- else:
- print "Your input was not y or n, try again:"
- def main():
- init_seed()
- play()
- ask_user()
- print 'Quitting game.'
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment