No longer ignoring .png files, thanks Mario.

This commit is contained in:
Woody Folsom
2012-04-19 20:55:22 -04:00
parent d9ec72d0fb
commit 10f43ee31c
9 changed files with 8 additions and 13 deletions

11
.gitignore vendored
View File

@@ -1,14 +1,5 @@
bin bin
build build
classes classes
dist dist
doc
docs
player.txt
DetailedInfo.txt
DetailedInfo.xml
*.png

BIN
res/img/blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
res/img/green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
res/img/none.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
res/img/red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
res/img/yellow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -18,7 +18,8 @@ public class Board {
private int numPlies = 0; private int numPlies = 0;
public Board(Board that) { public Board(Board that) {
this(); board = new TileColor[NUM_ROWS][NUM_COLS];
for (int i = 0; i < NUM_COLS; i++) { for (int i = 0; i < NUM_COLS; i++) {
for (int j = 0; j < NUM_ROWS; j++) { for (int j = 0; j < NUM_ROWS; j++) {
this.board[j][i] = that.board[j][i]; this.board[j][i] = that.board[j][i];

View File

@@ -12,7 +12,7 @@ import org.apache.log4j.Logger;
public class AlphaBetaMoveGenerator implements MoveGenerator { public class AlphaBetaMoveGenerator implements MoveGenerator {
private static final Logger LOGGER = Logger private static final Logger LOGGER = Logger
.getLogger(AlphaBetaMoveGenerator.class.getName()); .getLogger(AlphaBetaMoveGenerator.class.getName());
private static final int DEFAULT_RECURSIVE_PLAYS = 2; private static final int DEFAULT_RECURSIVE_PLAYS = 3;
private final BoardScorer scorer = new BoardScorer(); private final BoardScorer scorer = new BoardScorer();
private final ValidMoveGenerator validMoveGenerator = new ValidMoveGenerator(); private final ValidMoveGenerator validMoveGenerator = new ValidMoveGenerator();

View File

@@ -27,8 +27,11 @@ public class ValidMoveGenerator implements MoveGenerator {
for (int j = 0; j < Board.NUM_COLS; j++) { for (int j = 0; j < Board.NUM_COLS; j++) {
if (board.getTile(i, j) == TileColor.NONE) { if (board.getTile(i, j) == TileColor.NONE) {
for (TileColor color : TileColor.values()) { for (TileColor color : TileColor.values()) {
if (color == TileColor.NONE) {
continue;
}
validMoves.add(new Move(color, i, j)); validMoves.add(new Move(color, i, j));
} }
} }
} }
} }