remove redundant .^ in Game.hs
This commit is contained in:
		
							parent
							
								
									70270dbbce
								
							
						
					
					
						commit
						ffd621f36a
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -134,7 +134,7 @@ handleTick ui =
 | 
				
			||||||
-- | Restart game at the same level
 | 
					-- | Restart game at the same level
 | 
				
			||||||
restart :: UI -> EventM Name (Next UI)
 | 
					restart :: UI -> EventM Name (Next UI)
 | 
				
			||||||
restart ui = do
 | 
					restart ui = do
 | 
				
			||||||
  let lvl = ui ^. game ^. level
 | 
					  let lvl = ui ^. (game . level)
 | 
				
			||||||
  g <- liftIO $ initGame lvl
 | 
					  g <- liftIO $ initGame lvl
 | 
				
			||||||
  continue $ ui & game .~ g
 | 
					  continue $ ui & game .~ g
 | 
				
			||||||
                & locked .~ False
 | 
					                & locked .~ False
 | 
				
			||||||
| 
						 | 
					@ -161,8 +161,8 @@ drawGrid ui =
 | 
				
			||||||
          foldr (<+>) emptyWidget
 | 
					          foldr (<+>) emptyWidget
 | 
				
			||||||
            . M.filterWithKey (\(V2 _ y) _ -> r == y)
 | 
					            . M.filterWithKey (\(V2 _ y) _ -> r == y)
 | 
				
			||||||
            $ mconcat
 | 
					            $ mconcat
 | 
				
			||||||
                [ drawBlockCell NormalBlock <$> ui ^. game ^. board
 | 
					                [ drawBlockCell NormalBlock <$> ui ^. (game . board)
 | 
				
			||||||
                , blockMap NormalBlock (ui ^. game ^. block)
 | 
					                , blockMap NormalBlock (ui ^. (game . block))
 | 
				
			||||||
                , case (ui ^. preview) of
 | 
					                , case (ui ^. preview) of
 | 
				
			||||||
                    Nothing -> M.empty
 | 
					                    Nothing -> M.empty
 | 
				
			||||||
                    Just s  -> blockMap (HardDropBlock s) (evalTetris hardDroppedBlock (ui ^. game))
 | 
					                    Just s  -> blockMap (HardDropBlock s) (evalTetris hardDroppedBlock (ui ^. game))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue