diff --git a/src/Mtlstats/Actions/EditGoalie.hs b/src/Mtlstats/Actions/EditGoalie.hs index 63fd6ed..94495a4 100644 --- a/src/Mtlstats/Actions/EditGoalie.hs +++ b/src/Mtlstats/Actions/EditGoalie.hs @@ -29,6 +29,7 @@ module Mtlstats.Actions.EditGoalie , editGoalieYtdLosses , editGoalieYtdTies , editGoalieLtGames + , editGoalieLtMins ) where import Control.Monad (void) @@ -110,6 +111,14 @@ editGoalieLtGames -> ProgState editGoalieLtGames games = editGoalie (gLifetime.gsGames .~ games) EGLifetime +-- | Edits a goalie's lifetime minutes played +editGoalieLtMins + :: Int + -- ^ The number of minutes + -> ProgState + -> ProgState +editGoalieLtMins = undefined + editGoalie :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState editGoalie f mode s = fromMaybe s $ do gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie diff --git a/src/Mtlstats/Prompt/EditGoalie.hs b/src/Mtlstats/Prompt/EditGoalie.hs index d473514..1181ed0 100644 --- a/src/Mtlstats/Prompt/EditGoalie.hs +++ b/src/Mtlstats/Prompt/EditGoalie.hs @@ -92,4 +92,5 @@ editGoalieLtGamesPrompt = numPrompt "Lifetime games played: " $ -- | Prompt to edit a goalie's lifetime minutes played editGoalieLtMinsPrompt :: Prompt -editGoalieLtMinsPrompt = undefined +editGoalieLtMinsPrompt = numPrompt "Lifetime minutes played: " $ + modify . editGoalieLtMins