-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
source-code.txt
188 lines (188 loc) · 2.28 KB
/
source-code.txt
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
Lbl M
10→A
ClrHome
Output(1,6,"GUESS THE NUMBER
Output(2,1,"Pick a number 0-9
Output(3,1,"then press Enter"
Output(4,1,"Use Arrow Keys to Select
Output(5,1,"Press Enter to Choose
0→⌊GUSNU(1)
7→M
Output(7,2,"Play
Output(8,2,"Stats
Output(9,2,"Quit
Lbl C1
Output(M,1,">"
Repeat K=34 or K=25 or K=105
getKey→K
End
If K=34
Then
If M=9
Then
7→M
Output(9,1," "
Else
Output(M,1," "
M+1→M
End
Goto C1
End
If K=25
Then
If M=7
Then
9→M
Output(7,1," "
Else
Output(M,1," "
M-1→M
End
Goto C1
End
If M=7
Goto C
If M=8
Goto S
If M=9
Goto Q
Lbl S
If dim(⌊GUSNU)=1
Then
ClrHome
Output(1,1,"Stats Requires a Profile
Output(2,1,"Would you like to Make
Output(3,1,"a Profile now?
7→M
Output(7,2,"Yes
Output(8,2,"No
Lbl C2
Output(M,1,">"
Repeat K=34 or K=25 or K=105
getKey→K
End
If K=25 or K=34
Then
If M=7
Then
8→M
Output(7,1," "
Else
7→M
Output(8,1," "
End
Goto C2
End
If M=8
Goto C
If M=7
{0,0,0,0,0,0}→⌊GUSNU
End
⌊GUSNU(2)+⌊GUSNU(3)→⌊GUSNU(4)
If ⌊GUSNU(4)>0
Then
round(⌊GUSNU(2)/⌊GUSNU(4)*100,2)→⌊GUSNU(5)
Else
0→⌊GUSNU(5)
End
ClrHome
Disp "",⌊GUSNU(2),⌊GUSNU(3),⌊GUSNU(4),⌊GUSNU(5)
Output(1,6,"GUESSES
Output(2,1,"Correct:
Output(3,1,"Incorrect:
Output(4,1,"Total:
Output(5,1,"Per. Correct:
Pause
Goto M
Lbl C
10→A
ClrHome
Output(1,6,"GUESS THE NUMBER
Output(3,8,"YOUR NUMBER
Output(4,13,"?"
Output(6,7,"ACTUAL NUMBER
Output(7,13,"?"
Lbl A
Repeat K=72 or K=73 or K=74 or K=82 or K=83 or K=84 or K=92 or K=93 or K=94 or K=102 or K=105
getKey→K
End
If K=102
0→A
If K=92
1→A
If K=93
2→A
If K=94
3→A
If K=82
4→A
If K=83
5→A
If K=84
6→A
If K=72
7→A
If K=73
8→A
If K=74
9→A
If A≠10
Output(4,13,A
If K=105
Then
If A=10
Then
Goto A
Else
Goto B
End
Else
Goto A
End
Lbl B
randInt(0,9)→B
Output(7,13,B)
Output(1,1," "
If B=A
Then
Output(1,1,"YOU GUESSED IT"
If dim(⌊GUSNU)≠1
⌊GUSNU(2)+1→⌊GUSNU(2)
End
If B≠A
Then
Output(1,1,"YOU GUESSED WRONG :("
If dim(⌊GUSNU)≠1
⌊GUSNU(3)+1→⌊GUSNU(3)
End
9→D
Output(9,2,"Again
Output(10,2,"Quit
Lbl U
Output(D,1,">"
Repeat K=34 or K=25 or K=105
getKey→K
End
If K=25 or K=34
Then
If D=9
Then
10→D
Output(9,1," "
Else
9→D
Output(10,1," "
End
Goto U
End
If K=105 and D=9
Goto C
Output(9,1," "
Output(10,1,"PRESS ANY KEY TO FINISH
0→K
Repeat K≠0
getKey→K
End
Lbl Q
ClrHome
Stop