implemented editGoalieLtWinsPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 02:40:01 -05:00
parent 13acbbdf35
commit dd34429f59
2 changed files with 11 additions and 1 deletions

View File

@ -31,6 +31,7 @@ module Mtlstats.Actions.EditGoalie
, editGoalieLtGames , editGoalieLtGames
, editGoalieLtMins , editGoalieLtMins
, editGoalieLtGoals , editGoalieLtGoals
, editGoalieLtWins
) where ) where
import Control.Monad (void) import Control.Monad (void)
@ -128,6 +129,14 @@ editGoalieLtGoals
-> ProgState -> ProgState
editGoalieLtGoals goals = editGoalie (gLifetime.gsGoalsAllowed .~ goals) EGLifetime editGoalieLtGoals goals = editGoalie (gLifetime.gsGoalsAllowed .~ goals) EGLifetime
-- | Edits a goalie's lifetime wins
editGoalieLtWins
:: Int
-- ^ The number of wins
-> ProgState
-> ProgState
editGoalieLtWins = 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

@ -104,4 +104,5 @@ editGoalieLtGoalsPrompt = numPrompt "Lifetime goals allowed: " $
-- | Prompt to edit a goalie's lifetime wins -- | Prompt to edit a goalie's lifetime wins
editGoalieLtWinsPrompt :: Prompt editGoalieLtWinsPrompt :: Prompt
editGoalieLtWinsPrompt = undefined editGoalieLtWinsPrompt = numPrompt "Lifetime wins: " $
modify . editGoalieLtWins