Hi and thanks for taking time and helping me out. I am writing a program to play Battleship in TI-BASIC. It's an amateuristic program, so don't judge me on my bad thinking or anything. I am from the Netherlands, so don't judge me on my English either
On to the program: I have put this BETA version on my TI84+, but it had an SYNTAX error in the last line, line 74 (End command). It somehow won't work, but I don't know why. It would be great if you could help me, so I can go on with my program. Thank you in advance.
Code:
On to the program: I have put this BETA version on my TI84+, but it had an SYNTAX error in the last line, line 74 (End command). It somehow won't work, but I don't know why. It would be great if you could help me, so I can go on with my program. Thank you in advance.
Code:
ClrHome
Disp "PASSWORD","PLAYER 1","4 NUMBERS"
Prompt P
[[0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0]]->[A]
[A]->[B]
ClrDraw
FnOff
PlotsOff
0->Xmin
10->Xmax
0->Ymin
10->Ymax
Horizontal 1
Horizontal 2
Horizontal 3
Horizontal 4
Horizontal 5
Horizontal 6
Horizontal 7
Horizontal 8
Horizontal 9
Horizontal 10
Vertical 1
Vertical 2
Vertical 3
Vertical 4
Vertical 5
Vertical 6
Vertical 7
Vertical 8
Vertical 9
Vertical 10
Disp "LAY DOWN","YOUR SHIPS"
Disp "1,1 IS","BOTTOMLEFT"
0->N
Repeat N=17
Menu("PLACEMENT","NEW START",AN,"UP",AU,"RIGHT",AR,"DOWN",AD,"LEFT",AL)
Lbl AN
DispGraph
Pause
Prompt X,Y
1->[A](X,Y)
Pt-On(X-.5,Y-.5)
Pause
N+1->N
End
Lbl AU
Y+1->Y
1->[A](X,Y)
Pt-On(X-.5,Y-.5)
Pause
N+1->N
End
Lbl AR
X+1->X
1->[A](X,Y)
Pt-On(X-.5,Y-.5)
Pause
N+1->N
End
Lbl AD
Y-1->Y
1->[A](X,Y)
Pt-On(X-.5,Y-.5)
Pause
N+1->N
End
Lbl AL
X-1->X
1->[A](X,Y)
Pt-On(X-.5,Y-.5)
Pause
N+1->N
End