reference goals and assists by index number, not names

This commit is contained in:
Jonathan Lamothe
2019-09-28 02:09:11 -04:00
parent ac92182b20
commit b8a3af11a1
4 changed files with 20 additions and 30 deletions

View File

@@ -207,10 +207,12 @@ data GameState = GameState
-- ^ Set to 'True' when the user confirms the entered data
, _pointsAccounted :: Int
-- ^ The number of game points accounted for
, _goalBy :: String
-- ^ The player who scored the most recently entered goal
, _assistsBy :: [String]
-- ^ The players who have assisted the most recently entered goal
, _goalBy :: Maybe Int
-- ^ The index number of the player who scored the most recently
-- entered goal
, _assistsBy :: [Int]
-- ^ The index numbers of the players who have assisted the most
-- recently entered goal
} deriving (Eq, Show)
-- | The type of game
@@ -507,7 +509,7 @@ newGameState = GameState
, _overtimeFlag = Nothing
, _dataVerified = False
, _pointsAccounted = 0
, _goalBy = ""
, _goalBy = Nothing
, _assistsBy = []
}