- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user