Skip to content
Permalink
Browse files
It's being annoying
  • Loading branch information
blakeb committed Oct 8, 2020
2 parents 768e371 + 40000df commit 2b2aeef3fca0fec117fa9a917d3b9f5fd07d3a30
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 28 deletions.
@@ -1,28 +1,49 @@
#Module formatting into story dictionary, 0:text where 0 is the index number of the module and text is the text of the module. \n=linebreak
story={0:"You are reading a magazine. The phone rings.\n (1)Continue reading the magazine and ignore the call \n (2)Inspect the room \n (3)You pick up the phone", 1:"You continue Archaeologist's Digest and read about how there's been a new discovery in Giza. How interesting. You can't read much further because the phone is still ringing. Loudly.", 2:"hi", 3:"OOOP", 4: "AAAAAA"}
y = 0
moduleProgressList = []

while True:
if y > -1:
moduleProgressList.append(y) #Adds the current module to the list of travelled modules
text = story[y]
print(text) #Displays module text based on y value recieved
x = input("Your choice is...")
if x.isdigit() == False: #This determines whether the value input is a digit
while x.isdigit() ==False:
print("This is an invalid input")
x = input("Your choice is...")
choiceNumber = int(x)
y = choiceNumber #y is the target module as chosen by the user input
else:
while y != int or ( y < 0):
print("This is an invalid input")
x = input("Your choice is...")
if x.isdigit() == False:
while x.isdigit() ==False:
print("This is an invalid input")
x = input("Your choice is...")
choiceNumber = int(x)
y = choiceNumber #This ensures that only valid numbers


from dictionary import *
y = 0
moduleProgressList = []
condition = True

while True:
condition = True
while condition == True:
if y > -1 and y < 61:
moduleProgressList.append(y) #Adds the current module to the list of travelled modules
text = story[y]
print(text) #Displays module text based on y value recieved
if y==50 or y==60 or y==59 or y==48 or y==52 or y==47:
condition = False #prevents user from accessing a different part once they have reached an endin
else:
x = input("Your choice is...")
if x.isdigit() == False: #This determines whether the value input is a digit
while x.isdigit() ==False:
print("This is an invalid input")
x = input("Your choice is...")
choiceNumber = int(x)
previous = y
y = choiceNumber #y is the target module as chosen by the user input
if y == 24:
hold = str(previous)
else:
while y != int or ( y < 0) or y > 60:
print("This is an invalid input")
x = input("Your choice is...")
if x.isdigit() == False:
while x.isdigit() ==False:
print("This is an invalid input")
x = input("Your choice is...")
choiceNumber = int(x)
previous = y
y = choiceNumber #This ensures that only valid numbers
if y == 24:
hold = previous #holds the location prior to moving into the runaway side branch so that the page they would return to is displayed on the screen when they go back
x = input("The End would you like to play again? y/n")
if x != "y" and x != "Y" and x!= "n" and x!= "N": #This determines whether the value input is a digit
while x != "y" and x != "Y" and x!= "n" and x!= "N":
print("This is an invalid input")
x = input("Your choice is...")
if x == "n" or "N":
break # breaks the while true loop if players dont want to restart



Binary file not shown.

0 comments on commit 2b2aeef

Please sign in to comment.