From 315f4865204ddb4c87d113e49b9065e41f0a5958 Mon Sep 17 00:00:00 2001 From: Sam Tay Date: Sat, 17 Jun 2017 02:54:52 -0400 Subject: [PATCH] Allow level == 0 --- src/Tetris.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tetris.hs b/src/Tetris.hs index 688fd54..fb8cc3d 100644 --- a/src/Tetris.hs +++ b/src/Tetris.hs @@ -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