- Reorganized the constructors in Move.java.

- Made the getBoardState method in Referee.java static.
- Created NeuralNetworkPlayer.java, though I don't know how to make the computer use it.
- Updated the Player interface to include passing the PlayerModel. Most of the current com agents ignore the data, but it is now available.
- Updated the train function in PlayerModel.java.
This commit is contained in:
Marshall
2012-04-29 14:19:10 -04:00
parent a756aa242d
commit 60a842d729
10 changed files with 201 additions and 94 deletions

View File

@@ -7,20 +7,20 @@ public class Move {
* Used when genMove() is called but no valid move exists for that player.
*/
public static final Move NONE = new Move(TileColor.NONE, -1, -1);
private final TileColor color;
private final CellPointer cp;
public Move(TileColor color, int row, int column) {
cp = new CellPointer(row,column);
this.color = color;
}
public Move(CellPointer cllPntr, TileColor tlClr) {
public Move(TileColor tlClr, CellPointer cllPntr) {
cp = cllPntr;
color = tlClr;
}
public Move(TileColor color, int row, int column) {
cp = new CellPointer(row, column);
this.color = color;
}
public CellPointer getCell() {
return cp;
}
@@ -28,7 +28,7 @@ public class Move {
public TileColor getColor() {
return color;
}
@Override
public String toString() {
return "Play " + color + "@" + cp;