Here's the final coding:
Code:
Do you think that this will work? If not, please say why.
Code:
1->A:2->B:3->C:4->D:5->E:6->F:7->G:8->H:9->I:10->J:6->M:5->N:4->O:4->P:3->Q:-2->Z
ClrDraw
0->Xmin
320->Xmax
-240->Ymin
0->Ymax
ClrDraw
AxesOff
For(X,0,10
Line(0,-13X,120,-13X
Line(12X,0,12X,-130
End
Text(90,0,"A"):Text(90,13,"B"):Text(90,23,"C"):Text(90,33,"D"):Text(90,43,"E"):Text(90,53,"F"):Text(90,63,"G"):Text(90,73,"H"):Text(90,83,"I"):Text(90,93,"J"):Text(110,100,"THE BATTELSHIP BOARD")
Pause
StorePic 1
Menu("BATTLESHIP","CREATE BOARD",4,"QUIT",3)
Lbl 4
While M!=1
Disp "CARRIER COORDINATES:"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
Pxl-On(V,R)
M-1->M
If M=1:Goto B
End
Lbl B
While N!=1
Disp "BATTLESHIP COORDINATES"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
Pxl-On(V,R)
N-1->N
If N=1:Goto C
End
Lbl C
While O!=1
Disp "CRUISER COORDINATES"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
Pxl-On(V,R)
O-1->O
If O=1:Goto D
End
Lbl D
While P!=1
Disp "SUBMARINE COORDINATES"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
Pxl-On(V,R)
P-1->P
If P=1:Goto E
End
Lbl E
While Q!=1
Disp "SPEEDBOAT COORDINATES"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
Pxl-On(V,R)
Q-1->Q
Z+1->Z
If Q=1:Goto F
End
Lbl F
If Z>=2:Then:Goto G
Else:StorePic 2:Goto 4
End
Lbl G
Repeat 0
StorePic 3
ClrDraw
RecallPic 2
Disp "PLAYER 1"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
10+pxl-Test(V,R)->K
For(X,0,3
For(Z,0,3
Pxl-On(V+X,R+Z,K)
End:End
StorePic 2
ClrDraw
RecallPic 3
Disp "PLAYER 2"
Input "COLUMN:",L
Input "ROW:",W
3+10(W-1)->R
3+9(L-1)->V
10+pxl-Test(V,R)->K
For(X,0,3
For(Z,0,3
Pxl-On(V+X,R+Z,K)
End:End:Goto G
End
Do you think that this will work? If not, please say why.