This commit is contained in:
Sam Tay 2017-06-17 11:15:52 -04:00
parent 344b4f8063
commit c49028a04c

View file

@ -159,10 +159,9 @@ isGameOver g = blockStopped g && g ^. block ^. origin == startOrigin
timeStep :: Game -> IO Game timeStep :: Game -> IO Game
timeStep g = if (blockStopped g) timeStep g = if (blockStopped g)
then return . coreUpdater $ g then stopUpdater g
else stopUpdater . coreUpdater $ g else return . gravitate $ g
where where
coreUpdater = gravitate
stopUpdater = nextBlock . updateScore . clearFullRows . freezeBlock stopUpdater = nextBlock . updateScore . clearFullRows . freezeBlock
-- TODO check if mapKeysMonotonic works -- TODO check if mapKeysMonotonic works