Handbook
Glossary
tick-update ( game-state -- )
Vocabulary
gamelib
.
demos
.
sokoban
.
loop
Inputs
game-state
an
object
Outputs
None
Definition
USING:
accessors
combinators
gamelib.demos.sokoban.layouts
gamelib.loop
gamelib.ui
kernel
math
namespaces
sequences
ui
ui.gadgets
;
IN:
gamelib.demos.sokoban.loop
::
tick-update
( game-state -- )
game-state
gadget>>
:>
g g
relayout-window
g
board>>
first
check-win
[
{
{
[
level
get-global
0
=
]
[
level
[
1
+
]
change-global
game-state g
{
}
>>board
{
}
>>draw-quotes
board-two
>>gadget
drop
g
{
1500 750
}
set-dim
relayout
]
}
{
[
level
get-global
1
=
]
[
level
[
1
+
]
change-global
game-state g
{
}
>>board
{
}
>>draw-quotes
board-three
>>gadget
drop
g
{
600 600
}
set-dim
relayout
]
}
{
[
level
get-global
2
=
]
[
g
game-over
relayout-1
stop-game
]
}
}
cond
]
when
;