game-status ( snake-game -- str )


Vocabulary
snake-game.ui

Inputs
snake-gamean object


Outputs
stran object


Definition


: 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 ;