-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasicfunc.py
139 lines (124 loc) · 3.29 KB
/
basicfunc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#Should handle most of the default functions that will come back throughout
def lowerit(i): #Makes the input lowercase for if blocks
return i.lower()
def stringit(i): #Makes the input strings for whatever reason
return str(i)
def left_is_right(i): #Function for making the "Left" direction correct
stringit(i)
lowerit(i)
if i == "left":
return "correct"
elif i == "right":
return "wrong"
else:
return "error (420)"
def right_is_right(i): #Function for making the "Right" direction correct
stringit(i)
lowerit(i)
if i == "left":
return "wrong"
elif i == "right":
return "correct"
else:
return "error (420)"
def up_is_right(i): #Function for making the "Up" direction correct
stringit(i)
lowerit(i)
if i == "up":
return "correct"
elif i == "down":
return "wrong"
else:
return "error (420)"
def down_is_right(i): #Function for making the "Down" direction correct
stringit(i)
lowerit(i)
if i == "up":
return "wrong"
elif i == "down":
return "correct"
else:
return "error (420)"
def pickup_is_right(i): #Function for making the "Pick Up" option correct
stringit(i)
lowerit(i)
if i == "pick up":
return "correct"
elif i =="leave there":
return "wrong"
else:
return "error (420)"
def leavethere_is_right(i): #Function for making the "Leave there" option correct
stringit(i)
lowerit(i)
if i == "pick up":
return "wrong"
elif i == "leave there":
return "correct"
else:
return "error (420)"
def yes_or_no(i): #Function returning yes or no
#OR statement removed due to it breaking the block
#Will fix soonish
stringit(i)
lowerit(i)
if i == "yes": #or "y":
return "yes"
elif i =="no": #or "n":
return "no"
else:
return "error (420)"
def menufunc(i): #Function managing menu
#OR statement removed to it breaking the block
#Will fix soonish
stringit(i)
lowerit(i)
if i == "start game": #or "continue":
return "starting game"
elif i == "how to play": #or "htp":
return "how to play"
elif i == "passcode" or i =="pc":
return "passcode"
else:
return "Error (69)"
def wake_up_is_right(i): #Wake up sequence function
stringit(i)
lowerit(i)
if i == "wake up":
return "correct"
elif i == "hit snooze":
return "wrong"
else:
return "error (420)"
def open_is_right(i): #Door open function
stringit(i)
lowerit(i)
if i == "open":
return "correct"
elif i == "keep closed":
return "wrong"
else:
return "error (420)"
def close_is_right(i): #Door open function
stringit(i)
lowerit(i)
if i == "open":
return "wrong"
elif i == "keep closed":
return "correct"
else:
return "error (420)"
def turn_on_is_right(i): #Turning on is right
if i == "turn on":
return "correct"
elif i == "keep off":
return "wrong"
else:
return "Error (420)"
def keep_off_is_right(i): #Keeping off is right
if i == "turn on":
return "wrong"
elif i == "keep off":
return "correct"
else:
return "Error 420"