dviator / PuertoRicoProject

Data collection and analysis of strategy in the board game Puerto Rico
1 stars 0 forks source link

Parsing JSON to a Turns Table #2

Open dviator opened 9 years ago

dviator commented 9 years ago

Write a basic version of the parser that can record each action in the JSON log.

dviator commented 9 years ago

Got the parser to the point that it can record the first turn into the Turn table. Currently implemented as a separate Timetracker class, which we then create a timetracker instance of, and pass that instance around the PRParser functions to keep updating the turn info at the proper points. Another way to do it that might be better would be to merge the Timetracker class into the PRParser class, do the initialization of turn values within the same init function. And then put the functions as functions of PRParser, so they can be more easily called to update values from within other PRParser functions. Still undecided, may try this method next time.