allow ProgMode to handle goalie creation
This commit is contained in:
parent
1782c0bc48
commit
2a94e99371
|
@ -64,6 +64,10 @@ dispatch s = case s^.progMode of
|
||||||
| null $ cps^.cpsName -> getPlayerNameC
|
| null $ cps^.cpsName -> getPlayerNameC
|
||||||
| null $ cps^.cpsPosition -> getPlayerPosC
|
| null $ cps^.cpsPosition -> getPlayerPosC
|
||||||
| otherwise -> confirmCreatePlayerC
|
| otherwise -> confirmCreatePlayerC
|
||||||
|
CreateGoalie cgs
|
||||||
|
| null $ cgs^.cgsNumber -> getGoalieNumC
|
||||||
|
| null $ cgs^.cgsName -> getGoalieNameC
|
||||||
|
| otherwise -> confirmCreateGoalieC
|
||||||
|
|
||||||
mainMenuC :: Controller
|
mainMenuC :: Controller
|
||||||
mainMenuC = Controller
|
mainMenuC = Controller
|
||||||
|
@ -336,6 +340,15 @@ confirmCreatePlayerC = Controller
|
||||||
return True
|
return True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getGoalieNumC :: Controller
|
||||||
|
getGoalieNumC = undefined
|
||||||
|
|
||||||
|
getGoalieNameC :: Controller
|
||||||
|
getGoalieNameC = undefined
|
||||||
|
|
||||||
|
confirmCreateGoalieC :: Controller
|
||||||
|
confirmCreateGoalieC = undefined
|
||||||
|
|
||||||
gameGoal :: ProgState -> (Int, Int)
|
gameGoal :: ProgState -> (Int, Int)
|
||||||
gameGoal s =
|
gameGoal s =
|
||||||
( s^.database.dbGames
|
( s^.database.dbGames
|
||||||
|
|
|
@ -196,12 +196,14 @@ data ProgMode
|
||||||
| NewSeason
|
| NewSeason
|
||||||
| NewGame GameState
|
| NewGame GameState
|
||||||
| CreatePlayer CreatePlayerState
|
| CreatePlayer CreatePlayerState
|
||||||
|
| CreateGoalie CreateGoalieState
|
||||||
|
|
||||||
instance Show ProgMode where
|
instance Show ProgMode where
|
||||||
show MainMenu = "MainMenu"
|
show MainMenu = "MainMenu"
|
||||||
show NewSeason = "NewSeason"
|
show NewSeason = "NewSeason"
|
||||||
show (NewGame _) = "NewGame"
|
show (NewGame _) = "NewGame"
|
||||||
show (CreatePlayer _) = "CreatePlayer"
|
show (CreatePlayer _) = "CreatePlayer"
|
||||||
|
show (CreateGoalie _) = "CreateGoalie"
|
||||||
|
|
||||||
-- | The game state
|
-- | The game state
|
||||||
data GameState = GameState
|
data GameState = GameState
|
||||||
|
|
Loading…
Reference in New Issue
Block a user