implemented editGoalieYtdWinsPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 01:40:42 -05:00
parent 4f5b4ff5f9
commit a8a5d6a305
2 changed files with 11 additions and 1 deletions

View File

@ -25,6 +25,7 @@ module Mtlstats.Actions.EditGoalie
, editGoalieYtdGames
, editGoalieYtdMins
, editGoalieYtdGoals
, editGoalieYtdWins
) where
import Control.Monad (void)
@ -74,6 +75,14 @@ editGoalieYtdGoals
-> ProgState
editGoalieYtdGoals goals = editGoalie (gYtd.gsGoalsAllowed .~ goals) EGYtd
-- | Edits a goalie's YTD wins
editGoalieYtdWins
:: Int
-- ^ The number of wins
-> ProgState
-> ProgState
editGoalieYtdWins = undefined
editGoalie :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState
editGoalie f mode s = fromMaybe s $ do
gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie

View File

@ -68,4 +68,5 @@ editGoalieYtdGoalsPrompt = numPrompt "Year-to-date goals allowed: " $
-- | Prompt to edit a goalie's YTD wins
editGoalieYtdWinsPrompt :: Prompt
editGoalieYtdWinsPrompt = undefined
editGoalieYtdWinsPrompt = numPrompt "Year-to-date wins: " $
modify . editGoalieYtdWins