implemented editGoalieLtGoalsPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 02:31:11 -05:00
parent 846d034435
commit c0386fa0b9
2 changed files with 11 additions and 1 deletions

View File

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

View File

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