From 80102d5a4a3c3f53c828a450330f90b762571ef4 Mon Sep 17 00:00:00 2001 From: Sam Tay Date: Sat, 17 Jun 2017 16:01:51 -0400 Subject: [PATCH] Derp city over here --- src/Tetris.hs | 2 +- src/UI/Game.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tetris.hs b/src/Tetris.hs index 4f07620..6d9b062 100644 --- a/src/Tetris.hs +++ b/src/Tetris.hs @@ -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)] diff --git a/src/UI/Game.hs b/src/UI/Game.hs index a0c3a2f..59734fd 100644 --- a/src/UI/Game.hs +++ b/src/UI/Game.hs @@ -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