implemented editGoalieLtGamesPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 02:11:35 -05:00
parent 8c482ae785
commit 6b1aa85010
2 changed files with 11 additions and 1 deletions

View File

@ -28,6 +28,7 @@ module Mtlstats.Actions.EditGoalie
, editGoalieYtdWins , editGoalieYtdWins
, editGoalieYtdLosses , editGoalieYtdLosses
, editGoalieYtdTies , editGoalieYtdTies
, editGoalieLtGames
) where ) where
import Control.Monad (void) import Control.Monad (void)
@ -101,6 +102,14 @@ editGoalieYtdTies
-> ProgState -> ProgState
editGoalieYtdTies ties = editGoalie (gYtd.gsTies .~ ties) EGYtd editGoalieYtdTies ties = editGoalie (gYtd.gsTies .~ ties) EGYtd
-- | Edits a goalie's lifetime games played
editGoalieLtGames
:: Int
-- ^ The number of games
-> ProgState
-> ProgState
editGoalieLtGames = 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

@ -86,4 +86,5 @@ editGoalieYtdTiesPrompt = numPrompt "Year-to-date ties: " $
-- | Prompt to edit a goalie's lifetime games played -- | Prompt to edit a goalie's lifetime games played
editGoalieLtGamesPrompt :: Prompt editGoalieLtGamesPrompt :: Prompt
editGoalieLtGamesPrompt = undefined editGoalieLtGamesPrompt = numPrompt "Lifetime games played: " $
modify . editGoalieLtGames