From ab5408f4648d7503b5c3c6f04196ab4778f66dda Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Sat, 31 Aug 2019 10:32:03 -0400 Subject: [PATCH] added date fields to GameState --- src/Mtlstats/Types.hs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Types.hs b/src/Mtlstats/Types.hs index af1fe03..22675a4 100644 --- a/src/Mtlstats/Types.hs +++ b/src/Mtlstats/Types.hs @@ -43,6 +43,9 @@ module Mtlstats.Types ( -- ** ProgMode Lenses gameStateL, -- ** GameState Lenses + gameYear, + gameMonth, + gameDay, gameType, otherTeam, homeScore, @@ -136,7 +139,13 @@ data ProgState = ProgState -- | The game state 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) , _otherTeam :: String -- ^ The name of the other team @@ -407,7 +416,10 @@ newProgState = ProgState -- | Constructor for a 'GameState' newGameState :: GameState newGameState = GameState - { _gameType = Nothing + { _gameYear = Nothing + , _gameMonth = Nothing + , _gameDay = Nothing + , _gameType = Nothing , _otherTeam = "" , _homeScore = Nothing , _awayScore = Nothing