implemented editGoalieYtdLossesPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 01:51:59 -05:00
parent e50861613d
commit 01859634a1
2 changed files with 11 additions and 1 deletions

View File

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

View File

@ -74,4 +74,5 @@ editGoalieYtdWinsPrompt = numPrompt "Year-to-date wins: " $
-- | Prompt to edit a goalie's YTD losses
editGoalieYtdLossesPrompt :: Prompt
editGoalieYtdLossesPrompt = undefined
editGoalieYtdLossesPrompt = numPrompt "Year-to-date losses: " $
modify . editGoalieYtdLosses