location-matrix ( board -- loclist )


Vocabulary
gamelib.board

Inputs
boardan object


Outputs
loclistan object


Definition


:: location-matrix ( board -- loclist )
board width>> :> w board height>> :> h w [0..b)
:> single-row h [0..b) :> single-col h
[ single-row ] replicate concat :> x-vals h [ w ] replicate
:> w-list w-list single-col [ make-n-k ] 2map
concat :> y-vals x-vals y-vals zip ;