From 2bc72a0e94e19cee145c609547bb29139ff06d17 Mon Sep 17 00:00:00 2001 From: Sam Tay Date: Sat, 17 Jun 2017 21:31:45 -0400 Subject: [PATCH] Format, remove unnecessary verbosity --- src/Tetris.hs | 5 ++--- src/UI/Game.hs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Tetris.hs b/src/Tetris.hs index c1a898a..292cfe2 100644 --- a/src/Tetris.hs +++ b/src/Tetris.hs @@ -21,7 +21,6 @@ import Data.Monoid (First(..)) -- 1. USE linear V2 instead of tuples.. dummy -- 3. possibly add 'user' to game state to draw name entry from UI.Game -- 4. sometimes freezes if manually shifting down while freezing --- 5. implement hard drop with spacebar -- Types and instances @@ -156,9 +155,9 @@ isGameOver g = blockStopped g && g ^. block ^. origin == startOrigin timeStep :: Game -> IO Game timeStep = bool - <$> (pure . gravitate) -- if not stopped + <$> (pure . gravitate) -- if not stopped <*> nextBlock . updateScore . clearFullRows . freezeBlock -- if stopped - <*> blockStopped -- predicate + <*> blockStopped -- predicate -- TODO check if mapKeysMonotonic works clearFullRows :: Game -> Game diff --git a/src/UI/Game.hs b/src/UI/Game.hs index 4a76976..32850fd 100644 --- a/src/UI/Game.hs +++ b/src/UI/Game.hs @@ -48,7 +48,7 @@ playGame lvl = do customMain (V.mkVty V.defaultConfig) (Just chan) app initialGame levelToDelay :: Int -> Int -levelToDelay n = floor $ 400000 * 0.85 ^ (2 * n) -- n + (fromIntegral n) +levelToDelay n = floor $ 400000 * 0.85 ^ (2 * n) -- Handling events