snake-game.game vocabulary
Factor handbook ยป Vocabulary index


Summary

Metadata
Parents:snake-game


Words

Tuple classes
ClassSuperclassSlots
snake-game tuplesnake snake-loc snake-dir food-loc next-turn-dir score paused? game-over?
snake-part tupledir type


Symbol words
:body
:down
:head
:left
:right
:tail
:up


Ordinary words
WordStack 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 )


Class predicate words
WordStack effect
snake-game?( object -- ? )
snake-part?( object -- ? )


Files