Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
189 lines (188 sloc) 2.28 KB
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