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() {
|
public int getTurn() {
|
||||||
return numPlies / 2;
|
return (numPlies + 1)/ 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ public class Referee implements Runnable {
|
|||||||
private void play() {
|
private void play() {
|
||||||
int plies = 0;
|
int plies = 0;
|
||||||
while (!isOver()) {
|
while (!isOver()) {
|
||||||
getScorePanel().updateScore(getPlayerScore());
|
|
||||||
if (board.isPlayerTurn()) {
|
if (board.isPlayerTurn()) {
|
||||||
boolean wasInterrupted = false;
|
boolean wasInterrupted = false;
|
||||||
while (!humanPlayer.isReady()) {
|
while (!humanPlayer.isReady()) {
|
||||||
@@ -189,12 +188,12 @@ public class Referee implements Runnable {
|
|||||||
// random, meaningless data.
|
// random, meaningless data.
|
||||||
// getPlayerModel().getOutputNodes(getBoardState(board));
|
// getPlayerModel().getOutputNodes(getBoardState(board));
|
||||||
}
|
}
|
||||||
|
getScorePanel().updateScore(getPlayerScore());
|
||||||
mf.updateMessage(getMessage());
|
mf.updateMessage(getMessage());
|
||||||
boardPanel.updateIcons();
|
boardPanel.updateIcons();
|
||||||
LOGGER.info("plies: " + plies++);
|
LOGGER.info("plies: " + plies++);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000L);
|
Thread.sleep(250L);
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
System.out
|
System.out
|
||||||
.println("Interrupted while waiting for human view ply!");
|
.println("Interrupted while waiting for human view ply!");
|
||||||
|
|||||||
Reference in New Issue
Block a user