SHARE
TWEET

Crazy Python

thebeastglasser Dec 16th, 2012 972 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import time
  2. global x
  3. global y
  4.  
  5. ## X is always going to be the name of player one and Y is always going to be the name for player 2
  6.  
  7. print "Welcome to Rock-Paper-Scissors thebeastglasser Style!"
  8. time.sleep(2)
  9.  
  10. print " "
  11.  
  12. print "Please when answering, make sure that your answer is spelled correctly and is in all lowercase letters. Your options consist of \"rock\" \"paper\" and \"scissors\" without the quotation marks of course. ;)"
  13.  
  14. time.sleep(6)
  15.  
  16. print "Ok, now for the fun part, naming."
  17.  
  18. time.sleep(2)
  19.  
  20. print " "
  21.  
  22. x = raw_input("Player 1, please enter the name you're going to use: ")
  23.  
  24. time.sleep(1)
  25.  
  26. print " "
  27.  
  28. print "Name has been entered!"
  29.  
  30. time.sleep(2)
  31.  
  32. print " "
  33.  
  34. print " "
  35.  
  36. y = raw_input("Ok player 2, please enter your name as well: ")
  37.  
  38. time.sleep(1)
  39.  
  40. print " "
  41.  
  42. print "Name has been entered!"
  43.  
  44. time.sleep(2)
  45.  
  46. print " "
  47.  
  48. print "Alright, so today in the arena, it's going to be", x, "versus", y + "!"
  49.  
  50. time.sleep(3)
  51.  
  52. print " "
  53.  
  54. print "Please wait a moment while the game renders."
  55.  
  56. print "Loading resources..."
  57.  
  58. print ""
  59.  
  60. time.sleep(3)
  61.  
  62. #below is the class that actually plays the game
  63.  
  64. def ROCKPAPERSCISSORS():
  65.  
  66.   #move is entered here
  67.  
  68.   winx = 0
  69.  
  70.   winy = 0
  71.  
  72.   print x
  73.  
  74.   player1 = raw_input(" please enter your move: ")
  75.  
  76.   print "rockpaperscissors" * 900
  77.  
  78.   time.sleep(1)
  79.  
  80.   print ""
  81.  
  82.   print y
  83.  
  84.   player2 = raw_input( "please enter your move: ")
  85.  
  86.   print " "
  87.  
  88.   #decides who wins the game
  89.  
  90.   if player1 == "rock" and player2 == "paper" :
  91.     print "Paper beats rock,", y, "wins!"
  92.     winy + 1
  93.  
  94.   #under each, there is a + 1 for the variable it should be added to
  95.    
  96.   elif player2 == "rock" and player1 == "paper":
  97.     print "Paper beats rock,", x, "wins!"
  98.     winx + 1
  99.    
  100.   elif player1 == "rock" and player2 == "scissors":
  101.     print "Rock beats scissors,", x, "wins!"
  102.     winx + 1
  103.    
  104.   elif player2 == "rock" and player1 == "scissors":
  105.     print "Rock beats scissors,", y, "wins!"
  106.     winy + 1
  107.  
  108.   elif player1 == "rock" and player2 == "rock":
  109.     print "It's a tie, that's boring. Play again to see if you can win!"
  110.  
  111.   elif player1 == "rock" and player2 == "spock":
  112.     print "Spock vaporizes rock,", y, "wins!"
  113.     winy + 1
  114.  
  115.   elif player2 == "rock" and player1 == "spock":
  116.     print "Spock vaporizes rock,", x, "wins!"
  117.     winx + 1
  118.  
  119.   elif player1 == "rock" and player2 == "lizard":
  120.     print "Rock crushes lizard,", x, "wins!"
  121.     winx + 1
  122.  
  123.   elif player2 == "rock" and player1 ==  "lizard":
  124.     print "Rock crushes lizard,", y, "wins!"
  125.     winy + 1
  126.  
  127.   elif player1 == "scissors" and player2 == "paper":
  128.     print "Scissors beats paper,", x, "wins!"
  129.     winx + 1
  130.  
  131.   elif player1 == "paper" and player2 == "scissors":
  132.     print "Scissors beats paper,", y, "wins!"
  133.     winy + 1
  134.  
  135.   elif player1 == "scissors" and player2 == "spock":
  136.     print "Spock smashes scissors,", y, "wins!"
  137.     winy + 1
  138.  
  139.   elif player1 == "spock" and player2 == "scissors":
  140.     print "Spock smashes scissors,", x, "wins!"
  141.     winx + 1
  142.  
  143.   elif player1 == "scissors" and player2 == "lizard":
  144.     print "Scissors decapitates lizard,", x, "wins!"
  145.     winx + 1
  146.  
  147.   elif player1 == "lizard" and player2 == "scissors":
  148.     print "Scissors decapitates lizard,", y, "wins!"
  149.     winy + 1
  150.  
  151.   elif player1 == "scissors" and player2 == "scissors":
  152.     print "It's a tie, that's boring. Play again to see if you can win!"
  153.  
  154.   elif player1 == "paper" and player2 == "paper":
  155.     print "It's a tie, that's boring. Play again to see if you can win!"
  156.  
  157.   elif player1 == "paper" and player2 == "spock":
  158.     print "Paper disproves Spock,", x, "wins!"
  159.     winx + 1
  160.  
  161.   elif player1 == "spock" and player2 == "paper":
  162.     print "Paper disproves Spock,", y, "wins!"
  163.     winy + 1
  164.  
  165.   elif player1 == "spock" and player2 == "lizard":
  166.     print "Lizard poisons Spock,", y, "wins!"
  167.     winy + 1
  168.  
  169.   elif player1 == "lizard" and player2 == "spock":
  170.     print "Lizard poisons Spock,", x, "wins!"
  171.     winx + 1
  172.  
  173.   elif player1 == "spock" and player2 == "spock":
  174.     print "Spock has met his evil clone! The world ends!"
  175.  
  176.   elif player1 == "lizard" and player2 == "lizard":
  177.     print "The lizards bite off each other's tails, but it's ok, because lizard tails always grow back."
  178.  
  179.   elif player1 == "lizard" and player2 == "paper":
  180.     print "Lizard eats paper,", x, "wins!"
  181.     winx + 1
  182.  
  183.   elif player1 == "paper" and player2 == "lizard":
  184.     print "Lizard eats paper,", y, "wins!"
  185.     winy + 1
  186.  
  187.   else:
  188.     print "One of you screwed up, nice job. Play again and see if you can type \"rock\" \"paper\" or \"scissors\" correctly next time."
  189.  
  190.   time.sleep(2)
  191.  
  192.   #below is where it should add up how many times a player has won
  193.  
  194.   print x, "has won", winx, "times!"
  195.  
  196.   time.sleep(2)
  197.  
  198.   print y, "has won", winy, "times!"
  199.  
  200.   time.sleep(2)
  201.  
  202.   #here it decides who is in the lead
  203.  
  204.   if winx > winy:
  205.     print x, "is in the lead!"
  206.  
  207.   elif winy > winx:
  208.     print y, "is in the lead!"
  209.  
  210.   else:
  211.     print "It's a tie game!"
  212.  
  213.   time.sleep(1)
  214.  
  215.   print "Want to play again?"
  216.  
  217.   time.sleep(1)
  218.  
  219.   replay = raw_input("Press <ENTER> to quit, or type \"again\" to play another round: ")
  220.  
  221.   while replay == "again" :
  222.     ROCKPAPERSCISSORS()
  223.  
  224.   else:
  225.     quit
  226. ROCKPAPERSCISSORS()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top