Advertisement
Guest User

c

a guest
Dec 10th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.09 KB | None | 0 0
  1. import time
  2. import random
  3. global memes
  4. memes = 0
  5. gold = 0
  6.  
  7.  
  8. meme_registry = [
  9.     ("Pepe", 10),
  10.     ("Damn, Daniel", -1),
  11.     ("Ted Cruz is the Zodiac Killer", 2),
  12.     ("DAT BOI", 20),
  13.     ("The Bee Movie", 15),
  14.     ("Nut Button", 10),
  15.     ("MLG", 8)
  16. ]
  17.  
  18.  
  19. def start():
  20.     print("Hello and welcome!")
  21.     time.sleep(2)
  22.     name = input("What is your name? ")
  23.     print("Greetings " + name )
  24.     time.sleep(2)
  25.     print("This objective of this game is to collect memes.")
  26.     time.sleep(2)
  27.     print("After collecting memes you can sell them by saying no to harvest a meme!")
  28.     time.sleep(2)
  29.     choice = input(" Would you like to play? Y/N: ")
  30.     if choice == "Y":
  31.         begin()
  32.     elif choice == "N":
  33.         print("Okay, Bye!")
  34. def begin():
  35.     global memes
  36.     global gold
  37.     print("--------------------------------------------------")
  38.     if gold > 99:
  39.         print("You have won the game!")
  40.         play = input("Do you want to play again?")
  41.         if play == "Y":
  42.             begin()
  43.         elif play == "N":
  44.             print("Okay bye!")
  45.  
  46.     harvest = input("Would you like to harvest a meme? Y/N: ")
  47.     if harvest == "Y":
  48.         time.sleep(0)
  49.         # This is where I added the dank meme part
  50.         newmeme = random.choice(meme_registry)
  51.        
  52.         print("You have harvested a", newmeme[0], "meme!")
  53.         print("It's worth", newmeme[1], "memes!")
  54.        
  55.         if random.random() < 0.1:
  56.             print("Yo, it was a dank one! It's worth double!")
  57.             memes = memes + newmeme[1] * 2
  58.         else:
  59.             memes = memes + newmeme[1] * 1
  60.            
  61.         print("You currently have", memes , "memes")
  62.         begin()
  63.     if harvest == "N":
  64.         sell = input("Do you want to sell your memes? Y/N5: ")
  65.         if sell == "Y":
  66.             global gold
  67.             global memes
  68.             print("You currently have " , memes , " memes")
  69.             print("You have sold your memes")
  70.             gold = memes * 10
  71.             memes = 0
  72.             print("Your gold is now " , gold)
  73.             begin()
  74.  
  75.  
  76. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement