diff --git a/src/Mtlstats/Actions/EditGoalie.hs b/src/Mtlstats/Actions/EditGoalie.hs index c229283..0a7e101 100644 --- a/src/Mtlstats/Actions/EditGoalie.hs +++ b/src/Mtlstats/Actions/EditGoalie.hs @@ -24,6 +24,7 @@ module Mtlstats.Actions.EditGoalie , editGoalieName , editGoalieYtdGames , editGoalieYtdMins + , editGoalieYtdGoals ) where import Control.Monad (void) @@ -65,6 +66,14 @@ editGoalieYtdMins -> ProgState editGoalieYtdMins mins = editGoalie (gYtd.gsMinsPlayed .~ mins) EGYtd +-- | Edits a goalie's YTD goals allowed +editGoalieYtdGoals + :: Int + -- ^ The number of goals + -> ProgState + -> ProgState +editGoalieYtdGoals = 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 eb783e3..c31b0cd 100644 --- a/src/Mtlstats/Prompt/EditGoalie.hs +++ b/src/Mtlstats/Prompt/EditGoalie.hs @@ -62,4 +62,5 @@ editGoalieYtdMinsPrompt = numPrompt "Year-to-date minutes played: " $ -- | Prompt to edit a goalie's YTD goales allowed editGoalieYtdGoalsPrompt :: Prompt -editGoalieYtdGoalsPrompt = undefined +editGoalieYtdGoalsPrompt = numPrompt "Year-to-date goals allowed: " $ + modify . editGoalieYtdGoals