Handbook
Glossary
draw-lines ( gadget -- )
Vocabulary
game-of-life
Inputs
gadget
an
object
Outputs
None
Definition
USING:
accessors
colors
kernel
math
opengl
ranges
sequences
;
IN:
game-of-life
::
draw-lines
( gadget -- )
gadget
size>>
:>
size gadget
grid>>
grid-dim
:>
( rows cols )
COLOR:
gray
gl-color
cols rows
[
size
*
]
bi@
:>
( w h ) rows
[0..b]
[|
j | j size
*
:>
y
{
0 y
}
{
w y
}
gl-line
]
each
cols
[0..b]
[|
i | i size
*
:>
x
{
x 0
}
{
x h
}
gl-line
]
each
;