implemented editGoalieLtTiesPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 02:57:56 -05:00
parent aac2752e95
commit 61d788cb4e
2 changed files with 11 additions and 1 deletions

View File

@ -33,6 +33,7 @@ module Mtlstats.Actions.EditGoalie
, editGoalieLtGoals
, editGoalieLtWins
, editGoalieLtLosses
, editGoalieLtTies
) where
import Control.Monad (void)
@ -146,6 +147,14 @@ editGoalieLtLosses
-> ProgState
editGoalieLtLosses losses = editGoalie (gLifetime.gsLosses .~ losses) EGLifetime
-- | Edits a goalie's lifetime ties
editGoalieLtTies
:: Int
-- ^ The number of ties
-> ProgState
-> ProgState
editGoalieLtTies = undefined
editGoalie :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState
editGoalie f mode s = fromMaybe s $ do
gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie

View File

@ -116,4 +116,5 @@ editGoalieLtLossesPrompt = numPrompt "Lifetime losses: " $
-- | Prompt to edit a goalie's lifetime ties
editGoalieLtTiesPrompt :: Prompt
editGoalieLtTiesPrompt = undefined
editGoalieLtTiesPrompt = numPrompt "Lifetime ties: " $
modify . editGoalieLtTies