diff --git a/src/Mtlstats/Control.hs b/src/Mtlstats/Control.hs index b8521d7..d6c3d95 100644 --- a/src/Mtlstats/Control.hs +++ b/src/Mtlstats/Control.hs @@ -41,9 +41,10 @@ import Mtlstats.Types -- run dispatch :: ProgState -> Controller dispatch s = case s^.progMode of - MainMenu -> mainMenuC - NewSeason -> newSeasonC + MainMenu -> mainMenuC + NewSeason -> newSeasonC NewGame gs -> newGameC gs + EditMenu -> editMenuC CreatePlayer cps | null $ cps^.cpsNumber -> getPlayerNumC | null $ cps^.cpsName -> getPlayerNameC @@ -70,6 +71,9 @@ newSeasonC = Controller return True } +editMenuC :: Controller +editMenuC = undefined + getPlayerNumC :: Controller getPlayerNumC = Controller { drawController = drawPrompt playerNumPrompt diff --git a/src/Mtlstats/Types.hs b/src/Mtlstats/Types.hs index 04f612b..6c5bc20 100644 --- a/src/Mtlstats/Types.hs +++ b/src/Mtlstats/Types.hs @@ -230,6 +230,7 @@ data ProgMode = MainMenu | NewSeason | NewGame GameState + | EditMenu | CreatePlayer CreatePlayerState | CreateGoalie CreateGoalieState | EditPlayer EditPlayerState @@ -239,6 +240,7 @@ instance Show ProgMode where show MainMenu = "MainMenu" show NewSeason = "NewSeason" show (NewGame _) = "NewGame" + show EditMenu = "EditMenu" show (CreatePlayer _) = "CreatePlayer" show (CreateGoalie _) = "CreateGoalie" show (EditPlayer _) = "EditPlayer"