Score increments when the player places a tile, also increments without the visible delay.
This commit is contained in:
@@ -62,7 +62,7 @@ public class Board {
|
||||
}
|
||||
|
||||
public int getTurn() {
|
||||
return numPlies / 2;
|
||||
return (numPlies + 1)/ 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -150,7 +150,6 @@ public class Referee implements Runnable {
|
||||
private void play() {
|
||||
int plies = 0;
|
||||
while (!isOver()) {
|
||||
getScorePanel().updateScore(getPlayerScore());
|
||||
if (board.isPlayerTurn()) {
|
||||
boolean wasInterrupted = false;
|
||||
while (!humanPlayer.isReady()) {
|
||||
@@ -178,7 +177,7 @@ public class Referee implements Runnable {
|
||||
} else {
|
||||
Move mv = computerPlayer.getMove(board, getPlayerModel());
|
||||
playToken(mv);
|
||||
|
||||
|
||||
// This is the call that gets a prediction of a user's move.
|
||||
// Some changes will probably be necessary to put it in the
|
||||
// right place and also to get the node weights. But... all in
|
||||
@@ -189,12 +188,12 @@ public class Referee implements Runnable {
|
||||
// random, meaningless data.
|
||||
// getPlayerModel().getOutputNodes(getBoardState(board));
|
||||
}
|
||||
|
||||
getScorePanel().updateScore(getPlayerScore());
|
||||
mf.updateMessage(getMessage());
|
||||
boardPanel.updateIcons();
|
||||
LOGGER.info("plies: " + plies++);
|
||||
try {
|
||||
Thread.sleep(1000L);
|
||||
Thread.sleep(250L);
|
||||
} catch (InterruptedException ie) {
|
||||
System.out
|
||||
.println("Interrupted while waiting for human view ply!");
|
||||
|
||||
Reference in New Issue
Block a user