Handbook
Glossary
do-game-step ( snake-game -- )
Vocabulary
snake-game
.
game
Inputs
snake-game
an
object
Outputs
None
Definition
USING:
kernel
;
IN:
snake-game.game
:
do-game-step
( snake-game -- )
dup
game-in-progress?
[
dup
?handle-pending-turn
dup
snake-will-eat-itself?
[
game-over
]
[
update-snake
]
if
]
[
drop
]
if
;