jschmidt10 / theresistance

The Resistance - Web Edition
0 stars 0 forks source link

refactor game object #11

Closed jschmidt10 closed 10 years ago

jschmidt10 commented 10 years ago

The game object is already starting to get unwieldy. The game object is doing a few different things: it's holding some data for historical purposes (rounds, mission results, proposals) which will later be queried by the user interface layer. It is also maintaining "current" state information (currentRound) and it is responsible for progressing the game.

Redesign game object to separate historical data and game progression. Clean up the API so all game interactions go through some GameDriver. Currently, Game provides some interactions (Game.propose()) but then some interactions are done with other domain objects (proposal.setVotes()).

jschmidt10 commented 10 years ago

calling this done for now. refactored config to contain only config values - it no longer uses anything containing game state