Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
3
Newest
 Student
Impact
~573 people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Mar
1
comment What would be the best way to store movements on a game to allow a rollback?
Command is a classic design pattern and exactly what I was going to suggest. Furthermore, I think each command should have a pointer to the player who made the move so that you can get a transcript of the entire game at the end simply by traversing the list and calling a "toString" type function for each command. For example, "Annie added a casual customer (wheat, pumpkin, turnip) and a helper (Shopper). Bill delivered to regular customer (wheat, pumpkin) for +8 cash," would be the descriptions for a couple of players turns in "At the Gates of Loyang".
May
23
awarded  Student
May
23
asked Just getting started in Spring and my preference is XML config over annotations. Correct or not?
Apr
6
answered When should JavaScript generate HTML?
Jun
27
answered New cloud development workflow using Github, Cloud9ide and CloudFoundry
May
19
awarded  Supporter
May
6
awarded  Autobiographer