Removed references to log4j.
This commit is contained in:
@@ -5,6 +5,5 @@
|
|||||||
<classpathentry kind="src" path="test"/>
|
<classpathentry kind="src" path="test"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="lib" path="lib/junit-4.10.jar"/>
|
<classpathentry kind="lib" path="lib/junit-4.10.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
Binary file not shown.
@@ -6,8 +6,6 @@ import model.comPlayer.Player;
|
|||||||
import model.playerModel.GameGoal;
|
import model.playerModel.GameGoal;
|
||||||
import model.playerModel.PlayerModel;
|
import model.playerModel.PlayerModel;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import view.BoardPanel;
|
import view.BoardPanel;
|
||||||
import view.HighScoreDialog;
|
import view.HighScoreDialog;
|
||||||
import view.MainFrame;
|
import view.MainFrame;
|
||||||
@@ -16,8 +14,6 @@ import view.ScorePanel;
|
|||||||
public class Referee implements Runnable {
|
public class Referee implements Runnable {
|
||||||
public static final String COM_TURN = "Waiting for the computer's move.";
|
public static final String COM_TURN = "Waiting for the computer's move.";
|
||||||
public static final String GAME_OVER = "Game over!";
|
public static final String GAME_OVER = "Game over!";
|
||||||
public static final Logger LOGGER = Logger.getLogger(Referee.class
|
|
||||||
.getName());
|
|
||||||
|
|
||||||
public static final String PLAYER_TURN = "Waiting for the player's move.";
|
public static final String PLAYER_TURN = "Waiting for the player's move.";
|
||||||
|
|
||||||
@@ -153,7 +149,6 @@ public class Referee implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void play() {
|
private void play() {
|
||||||
int plies = 0;
|
|
||||||
while (!isOver()) {
|
while (!isOver()) {
|
||||||
if (board.isPlayerTurn()) {
|
if (board.isPlayerTurn()) {
|
||||||
boolean wasInterrupted = false;
|
boolean wasInterrupted = false;
|
||||||
@@ -197,7 +192,7 @@ public class Referee implements Runnable {
|
|||||||
getScorePanel().updateScore(getPlayerScore());
|
getScorePanel().updateScore(getPlayerScore());
|
||||||
mf.updateMessage(getMessage());
|
mf.updateMessage(getMessage());
|
||||||
boardPanel.updateIcons();
|
boardPanel.updateIcons();
|
||||||
LOGGER.info("plies: " + plies++);
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(250L);
|
Thread.sleep(250L);
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
|
|||||||
@@ -8,12 +8,8 @@ import model.BoardScorer;
|
|||||||
import model.Move;
|
import model.Move;
|
||||||
import model.SearchResult;
|
import model.SearchResult;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
public class AlphaBetaMoveGenerator implements MoveGenerator {
|
public class AlphaBetaMoveGenerator implements MoveGenerator {
|
||||||
private static final int DEFAULT_RECURSIVE_PLAYS = 1;
|
private static final int DEFAULT_RECURSIVE_PLAYS = 1;
|
||||||
private static final Logger LOGGER = Logger
|
|
||||||
.getLogger(AlphaBetaMoveGenerator.class.getName());
|
|
||||||
|
|
||||||
private final BoardScorer scorer = new BoardScorer();
|
private final BoardScorer scorer = new BoardScorer();
|
||||||
private final ValidMoveGenerator validMoveGenerator = new ValidMoveGenerator();
|
private final ValidMoveGenerator validMoveGenerator = new ValidMoveGenerator();
|
||||||
@@ -36,7 +32,6 @@ public class AlphaBetaMoveGenerator implements MoveGenerator {
|
|||||||
@Override
|
@Override
|
||||||
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
||||||
Move[] doNothing = new Move[] { Move.NONE };
|
Move[] doNothing = new Move[] { Move.NONE };
|
||||||
LOGGER.info("Minimax genMoves() stub returning []");
|
|
||||||
return Arrays.asList(doNothing);
|
return Arrays.asList(doNothing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ import model.BoardScorer;
|
|||||||
import model.Move;
|
import model.Move;
|
||||||
import model.SearchResult;
|
import model.SearchResult;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
public class MinimaxMoveGenerator implements MoveGenerator {
|
public class MinimaxMoveGenerator implements MoveGenerator {
|
||||||
private static final Logger LOGGER = Logger
|
|
||||||
.getLogger(MinimaxMoveGenerator.class.getName());
|
|
||||||
private static final int DEFAULT_RECURSIVE_PLAYS = 2;
|
private static final int DEFAULT_RECURSIVE_PLAYS = 2;
|
||||||
|
|
||||||
private final BoardScorer scorer = new BoardScorer();
|
private final BoardScorer scorer = new BoardScorer();
|
||||||
@@ -93,13 +89,9 @@ public class MinimaxMoveGenerator implements MoveGenerator {
|
|||||||
return recursionLevel < 1;
|
return recursionLevel < 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* AlphaBetaMoveGenerator2 does not support this method.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
||||||
Move[] doNothing = new Move[] { Move.NONE };
|
Move[] doNothing = new Move[] { Move.NONE };
|
||||||
LOGGER.info("Minimax genMoves() stub returning []");
|
|
||||||
return Arrays.asList(doNothing);
|
return Arrays.asList(doNothing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ import model.BoardScorer;
|
|||||||
import model.Move;
|
import model.Move;
|
||||||
import model.SearchResult;
|
import model.SearchResult;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
public class MonteCarloMoveGenerator implements MoveGenerator {
|
public class MonteCarloMoveGenerator implements MoveGenerator {
|
||||||
private static final Logger LOGGER = Logger
|
|
||||||
.getLogger(MonteCarloMoveGenerator.class.getName());
|
|
||||||
private static final int DEFAULT_RECURSIVE_PLAYS = 3;
|
private static final int DEFAULT_RECURSIVE_PLAYS = 3;
|
||||||
private static final int MOVES_PER_LEVEL = 12;
|
private static final int MOVES_PER_LEVEL = 12;
|
||||||
|
|
||||||
@@ -73,13 +69,9 @@ public class MonteCarloMoveGenerator implements MoveGenerator {
|
|||||||
return new SearchResult(bestResult.move, (int)Math.round((double)totalScore / validMoves.size()));
|
return new SearchResult(bestResult.move, (int)Math.round((double)totalScore / validMoves.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* AlphaBetaMoveGenerator2 does not support this method.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
public List<Move> genMoves(Board board, boolean asHuman, int nMoves) {
|
||||||
Move[] doNothing = new Move[] { Move.NONE };
|
Move[] doNothing = new Move[] { Move.NONE };
|
||||||
LOGGER.info("Minimax genMoves() stub returning []");
|
|
||||||
return Arrays.asList(doNothing);
|
return Arrays.asList(doNothing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,15 +9,9 @@ import model.Board.TileColor;
|
|||||||
import model.CellPointer;
|
import model.CellPointer;
|
||||||
import model.Move;
|
import model.Move;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
public class ValidMoveGenerator implements MoveGenerator {
|
public class ValidMoveGenerator implements MoveGenerator {
|
||||||
private static final Logger LOGGER = Logger
|
|
||||||
.getLogger(ValidMoveGenerator.class.getName());
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Move genMove(Board board, boolean asHuman) {
|
public Move genMove(Board board, boolean asHuman) {
|
||||||
LOGGER.info("ValidMoveGenerator genMove() stub returning NONE");
|
|
||||||
return Move.NONE;
|
return Move.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user