Handbook
Glossary
game-status ( snake-game -- str )
Vocabulary
snake-game
.
ui
Inputs
snake-game
an
object
Outputs
str
an
object
Definition
USING:
accessors
combinators
formatting
kernel
;
IN:
snake-game.ui
:
game-status
( snake-game -- str )
[
score>>
]
[
{
{
[
dup
game-over?>>
]
[
drop
"Game Over"
]
}
{
[
dup
paused?>>
]
[
drop
"Game Paused"
]
}
[
drop
"Game In Progress"
]
}
cond
]
bi
"Score: %d -- %s"
sprintf
;