Set up the machine  :" at line ";:_exit + -256=&83 -256=&84 0:"GSCALE16" (*ESCOFF 2*FX4,1 "< Snake path and world storage Fmax%=384: path% max%*2 P world% 48 Z Game settings dmaze%=1:speed%=5 n Main program loop x -::8,2)"Nibbles!"5,3)"Ben Ryves 2009" cM%=0::6,6-M%)" "17,6-M%)" "6,5+M%)"*"17,5+M%)"*"8,5)"Speed: ";speed%8,6)"Maze: ";maze% @K%=0: K%-135 _menuDn,_menuUp,_menuToggle,_menuToggle K%=13K%=27  K%=27:_exit *REFRESHOFF  New game ":7,4)"Get ready!";:*REFRESH  Load the maze 5 maze% _maze1,_maze2,_maze3,_maze4 _maze0 m:Y%=015:X%=0238:world%?(Y%*3+X%8):Z%=07:(X%+Z%)*64,Y%*64:97+((_world(X%+Z%,Y%)=0)2),63,63: : nlen%=4:head%=2*(len%-1):tail%=0:X%=11:Y%=8:I%=0max%:path%?(I%*2)=X%:path%?(I%*2+1)=Y%::_world(X%,Y%,) KS%=(9-speed%)*5+3:U%=1:V%=0:A%=X%:B%=Y%:gameOver%=:points%=-1:_apple  Game loop o: _apple M%=path%?tail%:N%=path%?(tail%+1):_world(M%,N%,):M%*64,N%*64:99,63,63:tail%=(tail%+2)max% >"X%=(X%+U%+24)24:Y%=(Y%+V%+16)16:gameOver%=_world(X%,Y%) b,head%=(head%+2)max%:path%?head%=X%:path%?(head%+1)=Y%:_world(X%,Y%,):X%*64,Y%*64:97,63,63 6*REFRESH 4@T%=+S%:oU%=U%:oV%=V%::K%=0:K%=27:gameOver%= "J K%-135 _lt,_rt,_dn,_up T >=T% ^gameOver% h:0=-1::0<>-1 r*REFRESHON 7|:8,3)points%;" points"4,5)"Play again? (Y/N)"; ':K$=:K$="Y"K$="y"K$="N"K$="n" K$="N"K$="n" *ESCON *FX4,0 : ; Check if we've eaten an apple, randomly replace if so ݤ_apple: X%<>A%Y%<>B% = :A%=(24)-1:B%=(16)-1 _world(A%,B%)=0 5A%*64+32,B%*64+32:145,31,0:points%=points%+1:= # Get or set point in the world f_world(X%,Y%,V%)P%=Y%*3+X%8:X%=X%7: V% world%?P%=world%?P%2^X% world%?P%=world%?P%(2^X%)  7ݤ_world(X%,Y%)P%=Y%*3+X%8:X%=X%7:=world%?P%2^X%  Mazes '_maze0:I%=0474:world%!I%=0:: n&_maze1:_maze0:I%=023:_world(I%,0,):_world(I%,15,)::I%=015:_world(0,I%,):_world(23,I%,):: n0_maze2:_maze1:I%=510:_world(0,I%,):_world(23,I%,)::I%=518:_world(I%,5,):_world(I%,10,):: n:_maze3:_maze2:I%=69:_world(5,I%,):_world(18,I%,)::I%=1013:_world(I%,5,):_world(I%,10,):: D_maze4:_maze1 ANI%=1013:_world(I%,0,):_world(I%,15,):_world(I%,12,): >XI%=69:_world(0,I%,):_world(23,I%,):_world(3,I%,): bI%=13:_world(9,I%,):_world(14,I%,):_world(9,15-I%,):_world(14,15-I%,):_world(I%,5,):_world(I%,10,):_world(23-I%,5,):_world(23-I%,10,): l v Change direction _lt:oU%<>1 U%=-1:V%=0  _rt:oU%<>-1 U%=1:V%=0  _up:oV%<>-1 U%=0:V%=1  _dn:oV%<>1 U%=0:V%=-1   Menus _menuToggle:M%=1-M%: ;_menuUp: M% maze%=(maze%+1)5 speed%=(speed%+1)10  ;_menuDn: M% maze%=(maze%+4)5 speed%=(speed%+9)10   Exit _exit   **REFRESHON 4*ESCON >*FX4,0 H