module GridBox.Row
( Row
, createBox
, makeRow
) where
import GridBox.Box (Box, makeBox)
import GridBox.Coordinate (getX, getY)
import Data.List (map)
type Row = [Box]
createBox :: (Double, Double) -> Double -> Double -> Int -> Int -> Box
createBox (sizeX, sizeY) xOffset yOffset row col =
makeBox (getX col sizeX xOffset) (getY row sizeY yOffset) row col (sizeX, sizeY)
makeRow :: (Double, Double) -> Double -> Double -> [Int] -> Int -> Row
makeRow size xOffset yOffset cols row =
map (createBox size xOffset yOffset row) cols