From 59d48ec154e64c4b85d8eef3b8e6b2d8b7c2f92c Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Tue, 17 Dec 2019 11:32:32 -0500 Subject: [PATCH] added EditMenu mode --- src/Mtlstats/Control.hs | 8 ++++++-- src/Mtlstats/Types.hs | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) 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"