#4 Setup interaction
This commit is contained in:
parent
ef784c2dbc
commit
9addf1ed07
13 changed files with 223 additions and 33 deletions
|
@ -19,22 +19,30 @@ data Game = Game {
|
|||
-- Main menu
|
||||
data State = Menu
|
||||
-- Select the level you want to play
|
||||
| LevelSelection { levelList :: [FilePath],
|
||||
selector :: ListSelector }
|
||||
| LevelSelection { levelList :: [FilePath],
|
||||
selector :: ListSelector }
|
||||
-- Playing a level
|
||||
| Playing { levels :: [Level],
|
||||
count :: Int,
|
||||
level :: Level,
|
||||
player :: Player,
|
||||
restart :: State }
|
||||
| Playing { levels :: [Level],
|
||||
count :: Int,
|
||||
level :: Level,
|
||||
player :: Player,
|
||||
restart :: State }
|
||||
-- Selecting an action
|
||||
| ActionSelection { actionList :: [Action],
|
||||
selector :: ListSelector,
|
||||
-- The player of this state will be used to interact
|
||||
continue :: State }
|
||||
-- Paused while playing a level
|
||||
| Paused { continue :: State }
|
||||
| Paused { continue :: State }
|
||||
-- Won a level
|
||||
| Win
|
||||
-- Lost a level
|
||||
| Lose { restart :: State }
|
||||
| Lose { restart :: State }
|
||||
| Error Message
|
||||
deriving (Eq, Show)
|
||||
|
||||
type Message = String
|
||||
|
||||
------------------------------- Level --------------------------------
|
||||
|
||||
data Level = Level {
|
||||
|
|
Reference in a new issue