oyachai/HearthSim — pull request #21 by Kallin (2014-09-16 14:30:47+00:00)
Title: moving minion and hero data into player model

This isn't ready for merge!
I just wanted to put this up there to show the massive refactoring I'm working on. In this state all the tests are passing, but I'm not happy about lines like:

record.put(turnCount + 1, boardModel_.getCurrentPlayer(), (BoardModel) boardModel_.deepCopy());

Basically, I replaced all the 0/1 indexing with references to the current or waiting player. It's too unwieldily though, so what I'm aiming to do is replace all of those with a simple ENUM, player status (WAITING/CURRENT). Now that it's in this state with all tests passing that next refactoring should be simpler, mostly searching and replacing all getCurrentPlayer()/getWaitingPlayer() calls with the enums and refactoring method signatures.

Hopefully there are no other big refactorings going on in parallel!