Alpha-Beta move generator can look 2 plays (4 plies) ahead on a 4x4 board and blocks every possible attempt by the player to connect 3.
It should be possible to play on larger boards when the computers 'move' is changed from playing a tile to picking the player's next available color.
This commit is contained in:
@@ -3,9 +3,19 @@ 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 color, int row, int column) {
|
||||
cp = new CellPointer(row,column);
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Move(CellPointer cllPntr, TileColor tlClr) {
|
||||
cp = cllPntr;
|
||||
color = tlClr;
|
||||
|
||||
Reference in New Issue
Block a user