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
, 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

View File

@ -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