Derp city over here
This commit is contained in:
parent
c49028a04c
commit
80102d5a4a
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ initBlock :: Tetrimino -> Block
|
|||
initBlock t = Block t startOrigin $ offset startOrigin $ relCells t
|
||||
|
||||
offset :: Coord -> [Coord] -> [Coord]
|
||||
offset (xo,yo) = fmap (\(x,y) -> (xo + x, yo + x))
|
||||
offset (xo,yo) = fmap (\(x,y) -> (xo + x, yo + y))
|
||||
|
||||
relCells :: Tetrimino -> [Coord]
|
||||
relCells I = [(-2,0), (-1,0), (1,0)]
|
||||
|
|
|
@ -89,7 +89,7 @@ drawGrid g = withBorderStyle BS.unicodeBold
|
|||
blkMap = M.fromList [(c, Just $ g ^. block ^. shape) | c <- g ^. block ^. to coords]
|
||||
|
||||
emptyMap :: Map Coord (Maybe a)
|
||||
emptyMap = M.fromList [((x,y), Nothing) | x <- [1..boardWidth], y <- [1,boardHeight]]
|
||||
emptyMap = M.fromList [((x,y), Nothing) | x <- [1..boardWidth], y <- [1..boardHeight]]
|
||||
|
||||
drawMCell :: Maybe Tetrimino -> Widget Name
|
||||
drawMCell Nothing = withAttr emptyAttr cw
|
||||
|
|
Loading…
Add table
Reference in a new issue