from msvcrt import getch as get
from random import randint
from time import sleep
from sys import exit
from os import name,system
from threading import Thread
places=["parti salonu","ön koridor","mutfak","kostüm odası","sol koridor","sağ koridor","ofis","safe room"]
#main_stage=["Freddy","Bonnie","Chica"]
#night=None
power=100
game=True
def cls():
system('cls' if name == 'nt' else 'clear')
def clock():
global t
t=12
while True:
sleep(1)
t+=1
class tool:
def __init__(self,name):
self.name=name
self.status=randint(5,7)
def zarar_ver(self):
self.status-=1
def durum(self):
if self.status < 2:
print(self.name,"bozuk!")
return False
else:
print(self.name,"iyi.")
return True
def tamir_et(self):
sleep(randint(2,5))
self.status=randint(5,7)
vent=tool("havalandırma sistemi")
ses_sistemi=tool("ses sistemi")
kamera=tool("kamera sistemi")
class character:
def __init__(self,name):
self.name=name
self.room=places.index("parti salonu")
self.room=int(self.room)
def ilerle(self):
if randint(0,20) == 4:
print("""
SAFE ROOM
*****************
*** /BAD END/ ***
*****************
""")
exit()
else:
self.room+=1
return places[self.room]
#placres=["parti salonu","ön koridor","mutfak","kostüm odası","sol koridor","sağ koridor","ofis","safe room"]
def cagir(self,room):
if room in places:
if places[places.index(room)+1] == places[self.room] or places[places.index(room)-1] == places[self.room]:
self.room=places[places.index(room)]
ses_sistemi.zarar_ver()
print("Springtrap'in konumu","{}".format(room))
else:
pass
else:
print("Bilinmeyen oda!")
pass
def menu():
while True:
text="""
Saat {}
Power : {}
C: Cameras
P: Tools panel\n
""".format(t,power)
input(text)
cls()
sp=character("Springtrap")
clocker=Thread(target=clock)
clocker.start()
menu_thread=Thread(target=menu)
menu_thread.start()
while game:
cls()