Snake: Difference between revisions
m
corrected M variable description
(use T in place of 1) |
m (corrected M variable description) |
||
Line 1,155:
=={{header|BASIC}}==
==={{header|Applesoft BASIC}}===
Rather than using DIM X%(1599),Y%(1599) which takes a long time to initialize, instead to speed this up, the program will POKE and PEEK the snake coordinates in memory. On initialization, LOMEM: 24576 moves variables out of the way
Continue playing by typing the CONT command from the Applesoft BASIC prompt if you quit or it's game over.
<syntaxhighlight lang="basic">REM === VARIABLES ===
REM
Line 1,175 ⟶ 1,177:
REM K KEYCODE
REM L LENGTH WIDTH&HEIGHT= 40
REM M MAX= 1599 UPPER BOUND OF SNAKE X
REM N NEW POSITION OF HEAD OF SNAKE
REM O OLD POSITION OF TAIL OF SNAKE
|