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:
Woody Folsom
2012-04-14 15:36:02 -04:00
parent 74b8eb4622
commit d9ec72d0fb
23 changed files with 396 additions and 69 deletions

View File

@@ -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;