Handbook
Glossary
key-dir ( key -- dir )
Vocabulary
snake-game
.
ui
Inputs
key
an
object
Outputs
dir
an
object
Definition
USING:
assocs
snake-game.game
;
IN:
snake-game.ui
:
key-dir
( key -- dir )
H{
{
"UP"
:up
}
{
"RIGHT"
:right
}
{
"DOWN"
:down
}
{
"LEFT"
:left
}
}
at
;