Files
cs8803p4/src/model/Move.java
Marshall 60a842d729 - 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.
2012-04-29 14:19:10 -04:00

37 lines
672 B
Java

package model;
import model.Board.TileColor;
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 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;
}
public TileColor getColor() {
return color;
}
@Override
public String toString() {
return "Play " + color + "@" + cp;
}
}