22 lines
565 B
Haskell
22 lines
565 B
Haskell
-- Describes the current state of the game,
|
|
-- e.g. Main menu, game, pause, win or lose
|
|
-- Allows to easily go to a next state and change rendering accordingly
|
|
|
|
module RPGEngine.Data.State
|
|
( State(..)
|
|
|
|
, nextState
|
|
) where
|
|
|
|
import RPGEngine.Data
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
-- Get the next state based on the current state
|
|
nextState :: State -> State
|
|
nextState Menu = Playing
|
|
nextState Playing = Pause
|
|
nextState Pause = Playing
|
|
nextState _ = Menu
|
|
|
|
----------------------------------------------------------------------
|