Author | Message |
---|---|
layla08
Posts: 70
|
Posted 16:09 Oct 08, 2015 |
Hi Dr. Abbott, Could I please get some clarification on #5 of Lab 2? It says:
I created an element to store all of the statistics (gameCount, start lower/upper, secret number, etc.) and am adding that to a list. Is there a way to figure out if I'm utilizing the game struct. the custom-write procedure, or neither? As far as I know, I'm using neither. I'm just fetching the individual elements and storing them in a statistics element. The end result looks just like the transcript example but I want to make sure I'm doing it correctly. Thanks for your time! |
rabbott
Posts: 1649
|
Posted 16:25 Oct 08, 2015 |
At the end of a game, your should create a game object -- using the game struct -- and then add that object to the list of games. An alternative, which I don't want people to do, is to create a game object, call a function that converts that to a string and then store that string in the list. This alternative is not what one would normally think of doing. But it occurred to me that someone might, so I wanted to warn against it. Last edited by rabbott at
08:39 Oct 09, 2015.
|
layla08
Posts: 70
|
Posted 21:06 Oct 08, 2015 |
Got it - thank you! |