implemented editGoalieYtdGamesPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 00:48:41 -05:00
parent 06348fe928
commit f739db4203
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Actions.EditGoalie
( editGoalieNumber
, editGoalieName
, editGoalieYtdGames
) where
import Control.Monad (void)
@ -47,6 +48,14 @@ editGoalieName
-> ProgState
editGoalieName name = editGoalie (gName .~ name) EGMenu
-- | Edits a goalie's YTD games
editGoalieYtdGames
:: Int
-- ^ The number of games played
-> ProgState
-> ProgState
editGoalieYtdGames = undefined
editGoalie :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState
editGoalie f mode s = fromMaybe s $ do
gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie

View File

@ -50,4 +50,5 @@ editGoalieNamePrompt = strPrompt "Goalie name: " $
-- | Prompt to edit a goalie's YTD games played
editGoalieYtdGamesPrompt :: Prompt
editGoalieYtdGamesPrompt = undefined
editGoalieYtdGamesPrompt = numPrompt "Year-to-date games played: " $
modify . editGoalieYtdGames