aboutsummaryrefslogtreecommitdiff
path: root/src/Game/State.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-16 22:13:37 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-16 22:13:37 +0100
commit5b13a8c276199f3ccdfdcb0d96dd7631b7e1b1fb (patch)
treef3d26b679325aeffe11eed690921a1d130a057b1 /src/Game/State.hs
parentbce1f36c1e1507e6c503f42c9ae0285d05b52619 (diff)
downloadspace-plat-hs-5b13a8c276199f3ccdfdcb0d96dd7631b7e1b1fb.tar.gz
space-plat-hs-5b13a8c276199f3ccdfdcb0d96dd7631b7e1b1fb.zip
Use play state instead of level complete, that includes game over
Diffstat (limited to 'src/Game/State.hs')
-rw-r--r--src/Game/State.hs10
1 files changed, 5 insertions, 5 deletions
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
}