added date fields to GameState
This commit is contained in:
parent
f9e7710122
commit
ab5408f464
@ -43,6 +43,9 @@ module Mtlstats.Types (
|
|||||||
-- ** ProgMode Lenses
|
-- ** ProgMode Lenses
|
||||||
gameStateL,
|
gameStateL,
|
||||||
-- ** GameState Lenses
|
-- ** GameState Lenses
|
||||||
|
gameYear,
|
||||||
|
gameMonth,
|
||||||
|
gameDay,
|
||||||
gameType,
|
gameType,
|
||||||
otherTeam,
|
otherTeam,
|
||||||
homeScore,
|
homeScore,
|
||||||
@ -136,7 +139,13 @@ data ProgState = ProgState
|
|||||||
|
|
||||||
-- | The game state
|
-- | The game state
|
||||||
data GameState = GameState
|
data GameState = GameState
|
||||||
{ _gameType :: Maybe GameType
|
{ _gameYear :: Maybe Int
|
||||||
|
-- ^ The year the game took place
|
||||||
|
, _gameMonth :: Maybe Int
|
||||||
|
-- ^ The month the game took place
|
||||||
|
, _gameDay :: Maybe Int
|
||||||
|
-- ^ The day of the month the game took place
|
||||||
|
, _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
|
||||||
@ -407,7 +416,10 @@ newProgState = ProgState
|
|||||||
-- | Constructor for a 'GameState'
|
-- | Constructor for a 'GameState'
|
||||||
newGameState :: GameState
|
newGameState :: GameState
|
||||||
newGameState = GameState
|
newGameState = GameState
|
||||||
{ _gameType = Nothing
|
{ _gameYear = Nothing
|
||||||
|
, _gameMonth = Nothing
|
||||||
|
, _gameDay = Nothing
|
||||||
|
, _gameType = Nothing
|
||||||
, _otherTeam = ""
|
, _otherTeam = ""
|
||||||
, _homeScore = Nothing
|
, _homeScore = Nothing
|
||||||
, _awayScore = Nothing
|
, _awayScore = Nothing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user