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^.cpsPosition -> getPlayerPosC
|
||||
| otherwise -> confirmCreatePlayerC
|
||||
CreateGoalie cgs
|
||||
| null $ cgs^.cgsNumber -> getGoalieNumC
|
||||
| null $ cgs^.cgsName -> getGoalieNameC
|
||||
| otherwise -> confirmCreateGoalieC
|
||||
|
||||
mainMenuC :: Controller
|
||||
mainMenuC = Controller
|
||||
|
@ -336,6 +340,15 @@ confirmCreatePlayerC = Controller
|
|||
return True
|
||||
}
|
||||
|
||||
getGoalieNumC :: Controller
|
||||
getGoalieNumC = undefined
|
||||
|
||||
getGoalieNameC :: Controller
|
||||
getGoalieNameC = undefined
|
||||
|
||||
confirmCreateGoalieC :: Controller
|
||||
confirmCreateGoalieC = undefined
|
||||
|
||||
gameGoal :: ProgState -> (Int, Int)
|
||||
gameGoal s =
|
||||
( s^.database.dbGames
|
||||
|
|
|
@ -196,12 +196,14 @@ data ProgMode
|
|||
| NewSeason
|
||||
| NewGame GameState
|
||||
| CreatePlayer CreatePlayerState
|
||||
| CreateGoalie CreateGoalieState
|
||||
|
||||
instance Show ProgMode where
|
||||
show MainMenu = "MainMenu"
|
||||
show NewSeason = "NewSeason"
|
||||
show (NewGame _) = "NewGame"
|
||||
show (CreatePlayer _) = "CreatePlayer"
|
||||
show (CreateGoalie _) = "CreateGoalie"
|
||||
|
||||
-- | The game state
|
||||
data GameState = GameState
|
||||
|
|
Loading…
Reference in New Issue
Block a user