added pointsAccounted field to GameState

This commit is contained in:
Jonathan Lamothe 2019-09-14 00:09:28 -04:00
parent 1a25c0dc92
commit 926a125692

View File

@ -55,6 +55,7 @@ module Mtlstats.Types (
awayScore, awayScore,
overtimeFlag, overtimeFlag,
dataVerified, dataVerified,
pointsAccounted,
-- ** CreatePlayerState Lenses -- ** CreatePlayerState Lenses
cpsNumber, cpsNumber,
cpsName, cpsName,
@ -176,24 +177,25 @@ instance Show ProgMode where
-- | The game state -- | The game state
data GameState = GameState data GameState = GameState
{ _gameYear :: Maybe Int { _gameYear :: Maybe Int
-- ^ The year the game took place -- ^ The year the game took place
, _gameMonth :: Maybe Int , _gameMonth :: Maybe Int
-- ^ The month the game took place -- ^ The month the game took place
, _gameDay :: Maybe Int , _gameDay :: Maybe Int
-- ^ The day of the month the game took place -- ^ The day of the month the game took place
, _gameType :: Maybe GameType , _gameType :: Maybe GameType
-- ^ The type of game (home/away) -- ^ The type of game (home/away)
, _otherTeam :: String , _otherTeam :: String
-- ^ The name of the other team -- ^ The name of the other team
, _homeScore :: Maybe Int , _homeScore :: Maybe Int
-- ^ The home team's score -- ^ The home team's score
, _awayScore :: Maybe Int , _awayScore :: Maybe Int
-- ^ The away team's score -- ^ The away team's score
, _overtimeFlag :: Maybe Bool , _overtimeFlag :: Maybe Bool
-- ^ Indicates whether or not the game went into overtime -- ^ Indicates whether or not the game went into overtime
, _dataVerified :: Bool , _dataVerified :: Bool
-- ^ Set to 'True' when the user confirms the entered data -- ^ Set to 'True' when the user confirms the entered data
, _pointsAccounted :: Int
} deriving (Eq, Show) } deriving (Eq, Show)
-- | The type of game -- | The type of game
@ -470,15 +472,16 @@ newProgState = ProgState
-- | Constructor for a 'GameState' -- | Constructor for a 'GameState'
newGameState :: GameState newGameState :: GameState
newGameState = GameState newGameState = GameState
{ _gameYear = Nothing { _gameYear = Nothing
, _gameMonth = Nothing , _gameMonth = Nothing
, _gameDay = Nothing , _gameDay = Nothing
, _gameType = Nothing , _gameType = Nothing
, _otherTeam = "" , _otherTeam = ""
, _homeScore = Nothing , _homeScore = Nothing
, _awayScore = Nothing , _awayScore = Nothing
, _overtimeFlag = Nothing , _overtimeFlag = Nothing
, _dataVerified = False , _dataVerified = False
, _pointsAccounted = 0
} }
-- | Constructor for a 'CreatePlayerState' -- | Constructor for a 'CreatePlayerState'