rameshvarun / Hnefatafl

Android Hnefatafl game using Google Play Games Services.
6 stars 3 forks source link

Minor Simulator Refactors #15

Closed rameshvarun closed 9 years ago

rameshvarun commented 9 years ago

Some minor simulator refactoring. These changes are made on top of #14.

  1. I turned Piece into an enum. There was no reason why it was a full class, since the only property of each instance was an enum anyway.
  2. I changed the winner from being a nullable player into an enum. This lets us represent four disjoint states: the winner is undetermined, the attacker has won, the defender has won, and the game ended in a tie.
jlwatson commented 9 years ago

delete branch?

rameshvarun commented 9 years ago

Yeah - typically, unless you want to add more stuff to the same 'feature', you can delete the branch.