Re: SNAKE


[Prev][Next][Index][Thread]

Re: SNAKE



I'm going to guess here, I've never written one of those snake games.
Probably the best way is to use the PixelTest command, as in If PixelTest=1
:disp "You lost!"   This has the advantage of not having to remember where the
snake has been, the graph screen records it all.  Why not find one of these
and check the code to see how others did it?  And of course, games like this
are always better in assembly than basic.

>I was wondering how programs register and remember the location the line the
>"snake" has created in a snake-type game. How does the calculator know that
>the head hits its body? Is there a command that says something like: "If X=23
>and Y=14 and L=1:disp "you lost!"   "  In which "L" is a black pixel and X and
>Y are coordinates.. Any feedback or an explination would be wonderful. Thanks
>in advance.