implemented assignPMinsPrompt

This commit is contained in:
Jonathan Lamothe 2019-10-09 22:32:14 -04:00
parent 1a481ab49d
commit 3d1f6170f6
2 changed files with 11 additions and 1 deletions

View File

@ -36,6 +36,7 @@ module Mtlstats.Actions
, awardGoal
, awardAssist
, resetGoalData
, assignPMins
) where
import Control.Monad.Trans.State (modify)
@ -210,3 +211,11 @@ resetGoalData ps = ps & progMode.gameStateL
%~ (goalBy .~ Nothing)
. (assistsBy .~ [])
. (confirmGoalDataFlag .~ False)
-- | Adds penalty minutes to a player
assignPMins
:: Int
-- ^ The number of minutes to add
-> ProgState
-> ProgState
assignPMins = undefined

View File

@ -244,7 +244,8 @@ pMinPlayerPrompt = selectPlayerPrompt
Just n -> modify $ progMode.gameStateL.selectedPlayer ?~ n
assignPMinsPrompt :: Prompt
assignPMinsPrompt = undefined
assignPMinsPrompt = numPrompt "Penalty minutes: " $
modify . assignPMins
drawSimplePrompt :: String -> ProgState -> C.Update ()
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer