Handbook
Glossary
on-click ( gadget -- )
Vocabulary
game-of-life
Inputs
gadget
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
math.order
namespaces
sequences
sequences.private
ui.gadgets
ui.gestures
;
IN:
game-of-life
::
on-click
( gadget -- )
gadget
size>>
:>
size gadget
grid>>
grid-dim
:>
( rows cols ) gadget
hand-rel
first2
[
size
/i
]
bi@
:>
( i j ) i 0 cols 1
-
between?
j 0 rows 1
-
between?
and
[
i j gadget
grid>>
nth-unsafe
[
not
dup
last-click
set
]
change-nth-unsafe
]
when
gadget
relayout-1
;