Allow level == 0
This commit is contained in:
		
							parent
							
								
									8e1c949a69
								
							
						
					
					
						commit
						315f486520
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -188,7 +188,7 @@ clearFullRows g = g & board %~ clearBoard
 | 
			
		|||
updateScore :: Game -> Game
 | 
			
		||||
updateScore g = g & score %~ (+ newPoints)
 | 
			
		||||
  where
 | 
			
		||||
    newPoints = (g ^. level) * (g ^. rowClears ^. to latestOrZero ^. to points)
 | 
			
		||||
    newPoints = (1 + g ^. level) * (g ^. rowClears ^. to latestOrZero ^. to points)
 | 
			
		||||
 | 
			
		||||
-- | Points awarded from number of rows cleared
 | 
			
		||||
points :: Int -- ^ rows cleared
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue