Python 3.4 - My first game
https://repl.it/repls/WhiteIncompleteCalculators
from time import sleep print('\nWelcome to the game!\n') sleep(1) print('------------------------------\n') sleep(1) choice = ''straightchoice = ''leftchoice = ''rightchoice = '' while choice != 'q': print('\nYou have entered the Spooky Castle.\n') sleep(1) print('There are three ways to go.\n') sleep(1) print('Straight (1),\n') sleep(.5) print('Left (2) or,\n') sleep(.5) print('Right (3).\n') sleep(1) print('Choose your path by entering the number.\n') sleep(1) print('press q to quit.') choice = input('\nEnter the number:') if choice == '1': sleep(1) print('\nUh oh...you chose to go straight.\n') (sleep(1)) print("\nThere's a three-headed dragon!!!\n") print('\nWhat do you want to do? Fight (1) or Flee (2)\n') sleep(.5) straightchoice = input('\nEnter the number:') if straightchoice == '1': sleep(1) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!") sleep(3) elif straightchoice == '2': sleep(1) print('\nThere was another dragon behind you.\n') print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!\n\n") sleep(3) if choice == '2': sleep(1) print('\n Uh oh...you went left\n') sleep(1) print('\n A giant, killer, clown-posse is running at you!\n') sleep(1) print('\nWhat do you want to do? Fight (1) or Flee (2) or Dance (3)\n') sleep(.5) leftchoice = input('\nEnter the number:') if leftchoice == '1': sleep(1) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!") if leftchoice == '2': sleep(1) print('\nThey caught up to you.\n') sleep(.5) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!") sleep(3) if leftchoice == '3': sleep(1) print('\nWhy did you choose to dance?\n') sleep(.5) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!\n\n") sleep(3) if choice == '3': sleep(1) print('\n Uh oh...you went right\n') sleep(1) print('\n You fell into a pool of man-eating dolphins with lasers on their heads!\n') sleep(.3) print('\nWhat do you want to do? Fight (1) or Flee (2) or Do Laps (3)\n') sleep(.5) rightchoice = input('\nEnter the number:') if rightchoice == '1': sleep(1) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!") if rightchoice == '2': sleep(1) print('\nUnfortunately...the lasers got you...bummer.\n') sleep(.5) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!") sleep(3) if rightchoice == '3': sleep(1) print('\nWhy did you choose to do laps?\n') sleep(.5) print('\nYou Died :(\n') sleep(.5) print("\n Let's play again!\n\n") sleep(3) if choice == 'q': sleep(1) print('\nGoodbye!') sleep(2) print('\nThat was fun!')
Comments