Parents: | snake-game |
Class | Superclass | Slots |
snake-game | tuple | snake snake-loc snake-dir food-loc next-turn-dir score paused? game-over? |
snake-part | tuple | dir type |
:body |
:down |
:head |
:left |
:right |
:tail |
:up |
Word | Stack effect |
<snake-game> | ( -- snake-game ) |
<snake-part> | ( dir type -- snake-part ) |
<snake> | ( -- snake ) |
?handle-pending-turn | ( snake-game -- ) |
?roll-over | ( x max -- x ) |
all-indices | ( -- points ) |
do-game-step | ( snake-game -- ) |
game-in-progress? | ( snake-game -- ? ) |
game-loc>index | ( loc -- n ) |
game-over | ( snake-game -- ) |
generate-food | ( snake-game -- snake-game ) |
grow-snake | ( snake dir -- snake ) |
increase-score | ( snake-game -- snake-game ) |
index>game-loc | ( n -- loc ) |
move-loc | ( loc dir -- loc ) |
move-snake | ( snake dir -- snake ) |
opposite-dir | ( dir -- dir ) |
snake-game-dim | ( -- value ) |
snake-occupied-indices | ( snake head-loc -- points ) |
snake-occupied-locs | ( snake head-loc -- points ) |
snake-unoccupied-indices | ( snake head-loc -- points ) |
snake-will-eat-food? | ( snake-game -- ? ) |
snake-will-eat-itself? | ( snake-game -- ? ) |
update-snake | ( snake-game -- ) |
update-snake-loc | ( snake-game -- snake-game ) |
update-snake-shape | ( snake-game growing? -- snake-game ) |
Word | Stack effect |
snake-game? | ( object -- ? ) |
snake-part? | ( object -- ? ) |