Format, remove unnecessary verbosity
This commit is contained in:
		
							parent
							
								
									e64715d051
								
							
						
					
					
						commit
						2bc72a0e94
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
					@ -21,7 +21,6 @@ import Data.Monoid (First(..))
 | 
				
			||||||
--   1. USE linear V2 instead of tuples.. dummy
 | 
					--   1. USE linear V2 instead of tuples.. dummy
 | 
				
			||||||
--   3. possibly add 'user' to game state to draw name entry from UI.Game
 | 
					--   3. possibly add 'user' to game state to draw name entry from UI.Game
 | 
				
			||||||
--   4. sometimes freezes if manually shifting down while freezing
 | 
					--   4. sometimes freezes if manually shifting down while freezing
 | 
				
			||||||
--   5. implement hard drop with spacebar
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Types and instances
 | 
					-- Types and instances
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,9 +155,9 @@ isGameOver g = blockStopped g && g ^. block ^. origin == startOrigin
 | 
				
			||||||
timeStep :: Game -> IO Game
 | 
					timeStep :: Game -> IO Game
 | 
				
			||||||
timeStep =
 | 
					timeStep =
 | 
				
			||||||
  bool
 | 
					  bool
 | 
				
			||||||
    <$> (pure . gravitate)                                -- if not stopped
 | 
					    <$> (pure . gravitate)                                    -- if not stopped
 | 
				
			||||||
    <*> nextBlock . updateScore . clearFullRows . freezeBlock -- if stopped
 | 
					    <*> nextBlock . updateScore . clearFullRows . freezeBlock -- if stopped
 | 
				
			||||||
    <*> blockStopped -- predicate
 | 
					    <*> blockStopped                                          -- predicate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- TODO check if mapKeysMonotonic works
 | 
					-- TODO check if mapKeysMonotonic works
 | 
				
			||||||
clearFullRows :: Game -> Game
 | 
					clearFullRows :: Game -> Game
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -48,7 +48,7 @@ playGame lvl = do
 | 
				
			||||||
  customMain (V.mkVty V.defaultConfig) (Just chan) app initialGame
 | 
					  customMain (V.mkVty V.defaultConfig) (Just chan) app initialGame
 | 
				
			||||||
 | 
					
 | 
				
			||||||
levelToDelay :: Int -> Int
 | 
					levelToDelay :: Int -> Int
 | 
				
			||||||
levelToDelay n = floor $ 400000 * 0.85 ^ (2 * n) -- n + (fromIntegral n)
 | 
					levelToDelay n = floor $ 400000 * 0.85 ^ (2 * n)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Handling events
 | 
					-- Handling events
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue