Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
some minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
2010person committed Mar 11, 2024
1 parent d3a9ac6 commit 6acc03c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
1 change: 0 additions & 1 deletion halloffame.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
2010person
36 changes: 18 additions & 18 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import sys # Default module so you should have it
from tkinter import * #Another default module
import time # Dno't worry this is default too
from tkinter import * # Another default module, used to create windows
import time # Don't worry this is default too

try: #The code is wrapped in a massive try-except statement to account for bugs
try: # The code is wrapped in a massive try-except statement to account for bugs

window = "" #placeholder for the window variable
window = "" # placeholder for the window variable


def admin(): #function for admin mode
Expand Down Expand Up @@ -149,7 +148,7 @@ def intro(): # The games introduction function
if option == "1":
print("""GAME OVER!
I mean, you can't really play without entering the temple!""")
sys.exit(1) #Ends the program
exit() #Ends the program
else:
print("""
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -222,16 +221,17 @@ def level_1():
1 - Wait in the darkness for something to come and kill us""")
if option == "1":
print("GAME OVER! I could have told you how you died, but it TOO DARK!!!")
sys.exit(1)
exit()
else:
print("Phew, let's go back to the entrance room and start from there!")
level_0()
else:
print(house[1][1]) # Description for the living room
print("""AARGH! The room key disintegrated after opening the door, it must have been very old.
Anyways the message is in a place where his hatred burned.
Therfore, I have located three possible locations in the living room:""")
while 0 == 0:
option = input("""AARGH! The room key disintegrated after opening the door, it must have been very old.
Anyways the message is in a place where his hatred burned.
Therfore, I have located three possible locations in the living room:
option = input("""
0(Default) - Sofa
1 - Fireplace
2 - Fossilised large cobweb structure?""")
Expand Down Expand Up @@ -288,7 +288,7 @@ def level_2():
1 - Wait in the darkness for something to come and kill us""")
if option == "1":
print("GAME OVER! I could have told you how you died, but it TOO DARK!!!")
sys.exit(1)
exit()
else:
print("Phew, let's go back to the living room and restart the level!")
level_1()
Expand Down Expand Up @@ -347,7 +347,7 @@ def level_3():
1 - Wait in the darkness for something to come and kill us""")
if option == "1":
print("GAME OVER! I could have told you how you died, but it TOO DARK!!!")
sys.exit(1)
exit()
else:
print("Phew, let's go back to the kitchen and restart the level!")
level_2()
Expand Down Expand Up @@ -403,7 +403,7 @@ def level_4():
1 - Wait in the darkness for something to come and kill us""")
if option == "1":
print("GAME OVER! I could have told you how you died, but it TOO DARK!!!")
sys.exit(1)
exit()
else:
print("Phew, let's go back to the parlour and restart the level!")
level_3()
Expand Down Expand Up @@ -503,7 +503,7 @@ def ghost_quitters():
global window
window.destroy() #Deystorys the tkinter window
print("GAME OVER!!! You quit, you lose!")
sys.exit(1)
exit()

def unamehalloffame():
global name
Expand All @@ -517,22 +517,22 @@ def unamehalloffame():
pass
print("The big username hall of fame, including you username, below:")
uname = open("halloffame.txt", "a") #Opens the file in appending mode
uname.write(name) #Appends the usernmae into the file
uname.write(name + " ") #Appends the username into the file
uname.close() # Closes the file
uname = open("halloffame.txt", "r") # Opens the file in reading mode
print(uname.read())
print("Well done for getting to the end but....")
print("GAME OVER!, sorry you lost to Napolean, stay tuned for version 4!")
sys.exit(1)
exit()

intro()#Calls the introduction function for the start


game() # Calls the main game function

except: #This is carried out if there is a bug in the game
except: #This is carried out if there is a bug in the game
print("I apolgize, but there has been an error in the game...")
print("Please report this error to Horror Games People Industries.")
print("Take a screenshot and tag us on X!")
print("I am afraid its GAME OVER! Please hold on while we resolve the problem...")
sys.exit(1)
exit()

0 comments on commit 6acc03c

Please sign in to comment.