From c0386fa0b95355aafdf85c21a328fa77d5d29aff Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 14 Nov 2019 02:31:11 -0500 Subject: [PATCH] implemented editGoalieLtGoalsPrompt --- src/Mtlstats/Actions/EditGoalie.hs | 9 +++++++++ src/Mtlstats/Prompt/EditGoalie.hs | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Mtlstats/Actions/EditGoalie.hs b/src/Mtlstats/Actions/EditGoalie.hs index 3a16443..99598fc 100644 --- a/src/Mtlstats/Actions/EditGoalie.hs +++ b/src/Mtlstats/Actions/EditGoalie.hs @@ -30,6 +30,7 @@ module Mtlstats.Actions.EditGoalie , editGoalieYtdTies , editGoalieLtGames , editGoalieLtMins + , editGoalieLtGoals ) where import Control.Monad (void) @@ -119,6 +120,14 @@ editGoalieLtMins -> ProgState editGoalieLtMins mins = editGoalie (gLifetime.gsMinsPlayed .~ mins) EGLifetime +-- | Edits a goalie's lifetime goals allowed +editGoalieLtGoals + :: Int + -- ^ The number of goals + -> ProgState + -> ProgState +editGoalieLtGoals = 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 8e17341..2ba1b1c 100644 --- a/src/Mtlstats/Prompt/EditGoalie.hs +++ b/src/Mtlstats/Prompt/EditGoalie.hs @@ -98,4 +98,5 @@ editGoalieLtMinsPrompt = numPrompt "Lifetime minutes played: " $ -- | Prompt to edit a goalie's lifetime goals allowed editGoalieLtGoalsPrompt :: Prompt -editGoalieLtGoalsPrompt = undefined +editGoalieLtGoalsPrompt = numPrompt "Lifetime goals allowed: " $ + modify . editGoalieLtGoals