From 61d788cb4ea6beca78e816b1cf8ef8f43e4c3994 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 14 Nov 2019 02:57:56 -0500 Subject: [PATCH] implemented editGoalieLtTiesPrompt --- src/Mtlstats/Actions/EditGoalie.hs | 9 +++++++++ src/Mtlstats/Prompt/EditGoalie.hs | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Mtlstats/Actions/EditGoalie.hs b/src/Mtlstats/Actions/EditGoalie.hs index e7b2752..1cd8364 100644 --- a/src/Mtlstats/Actions/EditGoalie.hs +++ b/src/Mtlstats/Actions/EditGoalie.hs @@ -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 diff --git a/src/Mtlstats/Prompt/EditGoalie.hs b/src/Mtlstats/Prompt/EditGoalie.hs index 7d69d1e..fdec636 100644 --- a/src/Mtlstats/Prompt/EditGoalie.hs +++ b/src/Mtlstats/Prompt/EditGoalie.hs @@ -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