Handbook
Glossary
get-dimension-matrix ( n gadget -- matrix )
Vocabulary
gamelib
.
ui
Inputs
n
an
object
gadget
an
object
Outputs
matrix
an
object
Definition
USING:
accessors
math
ranges
sequences
;
IN:
gamelib.ui
::
get-dimension-matrix
( n gadget -- matrix )
n gadget
get-cell-dimension
:>
celldims n gadget
board>>
nth
width>>
[0..b)
[
celldims
first
*
]
map
:>
widths n gadget
board>>
nth
height>>
[0..b)
[
celldims
second
*
]
map
:>
heights widths heights
cartesian-product
flip
;