Handbook
Glossary
update-snake ( snake-game -- )
Vocabulary
snake-game
.
game
Inputs
snake-game
an
object
Outputs
None
Definition
USING:
combinators
kernel
;
IN:
snake-game.game
:
update-snake
( snake-game -- )
dup
snake-will-eat-food?
{
[
[
increase-score
]
when
]
[
update-snake-shape
]
[
drop
update-snake-loc
]
[
[
generate-food
]
when
]
}
cleave
drop
;