Handbook
Glossary
game-logic ( gadget -- gadget )
Vocabulary
gamelib
.
demos
.
sokoban
Inputs
gadget
an
object
Outputs
gadget
an
object
Definition
USING:
accessors
gamelib.board
gamelib.ui
sequences
ui.gestures
;
IN:
gamelib.demos.sokoban
:
game-logic
( gadget -- gadget )
T{
key-down
{
sym
"UP"
}
}
[
board>>
first
UP
sokoban-move
]
new-gesture
T{
key-down
{
sym
"DOWN"
}
}
[
board>>
first
DOWN
sokoban-move
]
new-gesture
T{
key-down
{
sym
"RIGHT"
}
}
[
board>>
first
RIGHT
sokoban-move
]
new-gesture
T{
key-down
{
sym
"LEFT"
}
}
[
board>>
first
LEFT
sokoban-move
]
new-gesture
;