From 5b13a8c276199f3ccdfdcb0d96dd7631b7e1b1fb Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 16 May 2023 22:13:37 +0100 Subject: Use play state instead of level complete, that includes game over --- src/Game/State.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Game/State.hs') diff --git a/src/Game/State.hs b/src/Game/State.hs index 083e6d4..df2d4fa 100644 --- a/src/Game/State.hs +++ b/src/Game/State.hs @@ -1,4 +1,4 @@ -module Game.State (State (..), initialState, levelState, maxLives, ExitState (..)) where +module Game.State (State (..), initialState, levelState, maxLives, PlayState (..)) where import Game.Entities.Const (hitDelay) import qualified Game.Map as M @@ -6,7 +6,7 @@ import qualified Game.Map as M maxLives :: Int maxLives = 4 -data ExitState = ExitOff | ExitEntry | ExitStarted | ExitDone deriving (Eq) +data PlayState = InPlay | IntoStage | ExitStarted | ExitDone | GameOver deriving (Eq) data State = State { batteries :: Int, @@ -17,7 +17,7 @@ data State = State gameOverDelay :: Int, exit :: Bool, lastBattery :: (Int, Int), - levelCompleted :: ExitState, + playState :: PlayState, currentLevel :: Int } @@ -33,7 +33,7 @@ initialState m = exit = False, -- doesn't matter where lastBattery = (0, 0), - levelCompleted = ExitEntry, + playState = IntoStage, currentLevel = 0 } @@ -47,5 +47,5 @@ levelState s m = exit = False, -- doesn't matter where lastBattery = (0, 0), - levelCompleted = ExitEntry + playState = IntoStage } -- cgit v1.2.3