`Lbl M Menu("Snake","Play",P,"Stats",W,"Quit",Q Lbl Q Stop Lbl W ClrHome Output(1,1,"≥15//Turns out I got the order of the numbers wrong, I fixed that as well Output(2,1,S Output(4,1,"≥20 Output(5,1,N Output(1,5,"≥30 Output(2,5,I Output(4,5,"≥40 Output(5,5,R Pause Goto M Lbl P`

I just need to find a place to put the rest, since it doesn't work when placed at the end or in the Lbl

]]>The scoring is simple, as you can do this:

`SetUpEditor HS 5→dim(ʟHS ... ;Snake game ClrHome If A>dim(ʟHS:Then A→ʟHS(6 SortD(ʟHS 5→dim(ʟHS End Disp "Score: Output(1,7,A Disp "High: For(I,1,5 Output(I+2,1,ʟHS(I End:Pause`

Just an example.

]]>Menu("SNAKE","PLAY",P,"STATS",W,"QUIT",Q

Lbl Q

Stop

Lbl W

ClrHome

Output(1,1,"≥15"

Output(1,2,S

If A≥15

S+1->S

Output(1,4,"≥20"

Output(1,5,N

If A≥20

N+1->N

Output(5,1,"≥30

Output(5,2,I

If A≥30

I+1->I

Output(5,4,"≥40"

Output(5,5,R

If A≥40

R+1->R

Lbl P

[Insert snake code here]

My main problem is that whenever I load the "STATS" option, it shows some of the display outputs then loads the game, I tried adding End's after the If command, but that lead to a syntax error, I tried just at the end of the Lbl, but that also ended up with a syntax error. I believe I have a good idea, but honestly I have no idea. I have another idea on it but I'm not sure.

Lbl W

ClrHome

Output(1,1,"≥15"

Output(1,2,S

Output(1,4,"≥20"

Output(1,5,N

Output(5,1,"≥30

Output(5,2,I

Output(5,4,"≥40

Output(5,5,R

[Skip to end]

augment({Ans},|LA->A

End

augment(Ans,{Ans(A->A

End

Lbl 0

ClrHome

A

If A≥15

S+1->S

[Insert the rest here]

Which one would work? Now that I type it out I feel like the second one would be better because the A value isn't set until then, but I'm not sure, I'll do some experimentation.

]]>Changed code is in

- I am unsure how to program will run if random generation is > 9
- It is a big map if you went 94x62.

:26→K

:1.1→B

:{4Ans→A

:ClrDraw:AxesOff:PlotsOff:FnOff

:For(A,1,ᴇ2

:randInt(1,**94**)+.1randInt(1,8→C

:Repeat C=Ans(1

:A→dim(ʟA

:ʟA(1

:Pxl-On(10fPart(Ans),int(Ans

:Pxl-Off(10fPart(B),int(B

:Pxl-On(10fPart(C),int(C

:getKey

:If Ans=45

:Goto 0

:If Ans=34 or 2>abs(Ans-25

:Ans→K

:ʟA(A→B

:ʟA(1)+(K=26)-(K=24)+.1((K=34)-(K=25

:If max(ʟA=Ans

:Goto 0

:Ans+**94**(not(int(Ans))-(**95**=int(Ans)))+.8(not(fPart(Ans))-(.9=fPart(Ans

:augment({Ans},ʟA→A

:End

:augment(Ans,{Ans(A→A

:End

:Lbl 0

:ClrDraw:ClrHome

:A

EDIT: Horizontal and Vertical make a line of pixels. Or you can do this but it isn't the best method.

`For(I,0,94 Pxl-On(0,I Pxl-On(62,I If I<63:Then Pxl-On(I,0 Pxl-On(I,94 End:End`

And no, Horizontal/Vertical Pxl-Test( does not work.

Pxl-Test( tests whether a pixel on the screen is ON or OFF with boolean expressions. Zero for off (false) and one for on (true).

]]>- Pt-On( and Pxl-On( accomplish the same thing. Except Pt-On( is more lenient than Pxl-On( because if the (x, y) coordinates go off the screen, it won't give you an error. But Pxl-On( is easier to manage because you have (y, x) instead of (x, y) and you don't have to set the the graph to a different window.
- You can use the code below and try it out on the graph screen.

`:26→K :1.1→B :{4Ans→A :ClrDraw:AxesOff:PlotsOff:FnOff :For(A,1,ᴇ2 :randInt(1,16)+.1randInt(1,8→C :Repeat C=Ans(1 :A→dim(ʟA :ʟA(1 :Pxl-On(10fPart(Ans),int(Ans :Pxl-Off(10fPart(B),int(B :Pxl-On(10fPart(C),int(C :getKey :If Ans=45 :Goto 0 :If Ans=34 or 2>abs(Ans-25 :Ans→K :ʟA(A→B :ʟA(1)+(K=26)-(K=24)+.1((K=34)-(K=25 :If max(ʟA=Ans :Goto 0 :Ans+16(not(int(Ans))-(17=int(Ans)))+.8(not(fPart(Ans))-(.9=fPart(Ans :augment({Ans},ʟA→A :End :augment(Ans,{Ans(A→A :End :Lbl 0 :ClrDraw:ClrHome :A`

It's pretty much the same on the home screen, just on the graph. But you don't have to use that code if you don't want. Change it around, play with it, make your own versions of it. Have fun :)

3. For your borders, you can use the Horizontal and Vertical commands.

4. You can use randInt( anywhere. Just make sure to keep the random number values within bounds of the graph screen.

1.) Should I use pt-on( or pxl-on( for the actual snake. I've experimented with the two a bit, but I figured I'd ask anyway.

2.) How would I have the snake move? Let's say for example I used pt-on(. I have a hunch it'd be "pt-on(X,Y,[insert whatever I used here, probably 2 or 1]" but I'm not positive.

3.) I'm planning on using pxl-test( to make the border work, is there a way to make a whole stretch of pixels instead of just 1?

4.) How should I make the RNG placement of the apples? Could I use some randInt( trickery or is that not usable on the graph screen?

That's all I can think of at the moment, if I think of any more, I'll put another post on here.

]]>