implemented editGoalieYtdGoalsPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 01:21:46 -05:00
parent 5dcd140280
commit 817c3c3fed
2 changed files with 11 additions and 1 deletions

View File

@ -24,6 +24,7 @@ module Mtlstats.Actions.EditGoalie
, editGoalieName , editGoalieName
, editGoalieYtdGames , editGoalieYtdGames
, editGoalieYtdMins , editGoalieYtdMins
, editGoalieYtdGoals
) where ) where
import Control.Monad (void) import Control.Monad (void)
@ -65,6 +66,14 @@ editGoalieYtdMins
-> ProgState -> ProgState
editGoalieYtdMins mins = editGoalie (gYtd.gsMinsPlayed .~ mins) EGYtd 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 :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState
editGoalie f mode s = fromMaybe s $ do editGoalie f mode s = fromMaybe s $ do
gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie

View File

@ -62,4 +62,5 @@ editGoalieYtdMinsPrompt = numPrompt "Year-to-date minutes played: " $
-- | Prompt to edit a goalie's YTD goales allowed -- | Prompt to edit a goalie's YTD goales allowed
editGoalieYtdGoalsPrompt :: Prompt editGoalieYtdGoalsPrompt :: Prompt
editGoalieYtdGoalsPrompt = undefined editGoalieYtdGoalsPrompt = numPrompt "Year-to-date goals allowed: " $
modify . editGoalieYtdGoals