-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAVOIDOC.txt
51 lines (51 loc) · 1.16 KB
/
AVOIDOC.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
Menu("Avoid the O's Game!","Play",1,"About",2
Lbl 1
ClrHome
1→A
1→B
randInt(5,10)→C
randInt(5,26)→D
randInt(5,10)→E
randInt(5,26)→F
randInt(7,10)→I
randInt(7,26)→J
Repeat (K=22) or (A=C and B=D) and (C=A and B=D) or (A=E and B=F) and (E=A and F=B) or (A=I and B=J) and (I=A and J=B)
Output(C,D," ")
min(10,max(1,C+randInt(⁻1,1)))→C
min(26,max(1,D+randInt(⁻1,1)))→D
Output(C,D,"O")
Output(E,F," ")
min(10,max(1,E+randInt(⁻1,1)))→E
min(26,max(1,F+randInt(⁻1,1)))→F
Output(E,F,"O")
Output(I,J," ")
min(10,max(1,I+randInt(⁻1,1)))→I
min(26,max(1,J+randInt(⁻1,1)))→J
Output(I,J,"W")
getKey→K
If Ans
Output(A,B," ")
min(10,max(1,A+sum(DeltaList(Ans={25,34→A
min(26,max(1,B+sum(DeltaList(K={24,26→B
Output(A,B,"X")
If (A=C and B=D) and (C=A and B=D) or (A=E and B=F) and (E=A and F=B)
Then
ClrHome
Output(5,9,"You lose!")
Pause ""
End
If (A=I and B=J) and (I=A and J=B)
Then
ClrHome
Output(5,10,"You win!")
Pause ""
End
End
ClrHome
Stop
Lbl 2
ClrHome
Output(1,1,"To play, use the D-pad. Avoid the O's and try to reach the W. To quit, press MODE. Press Enter to exit this menu.")
Pause ""
ClrHome
Stop