4->A:8->B
2->C:2->D
"XXXXXXXXXXXXXXXXX XXX X X XXXXX X XXX X X X X XXX X X XXX X XXX X XXX X XXXX XXXXXXXXXXXXXXXXXX"->Str2
Output(1,1,Ans
Repeat K=21 or A=C and B=D
getKey->K
If Ans
Output(A,B,"
If K=11
Then
A->E:B->F
Output(E-1,F,"B
End
sum(ΔList(K={25,34
A+Ans(" "=sub(Str2,16(A-1+Ans)+B,1->A
sum(ΔList(K={24,26
B+Ans(" "=sub(Str2,16A-16+B+Ans,1->B
randInt(-1,1)
C+Ans(" "=sub(Str2,16(C-1+Ans)+D,1->C
randInt(-1,1)
D+Ans(" "=sub(Str2,16C-16+D+Ans,1->D
Output(C,D,"
Output(C,D,"*
Output(A,B,"O
If C≥E-2 and C≤E+2 or D≥F-2 and D≤F+2
Disp "YOU WIN"
End
I was trying to make it so that when you press the Y= button, it drops a bomb, or the letter B, on the screen. Then if the AI piece gets within 2 spaces of the bomb through either the x or y coordinates, then you win. Right now it just ends the game when it's close to the first value entered into the bomb coordinates.
Also, I was wondering how to delete the AI piece (*) after it moves? So there isn't a trail of *'s on the map.