dev #12
@@ -30,6 +30,7 @@ public class PgnTest {
|
|||||||
commandExecutor.addListener(new GameAdapter() {
|
commandExecutor.addListener(new GameAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void onGameEnd() {
|
public void onGameEnd() {
|
||||||
|
// does not work with this for some reason ...
|
||||||
synchronized (game) {
|
synchronized (game) {
|
||||||
game.notifyAll();
|
game.notifyAll();
|
||||||
}
|
}
|
||||||
@@ -85,17 +86,17 @@ public class PgnTest {
|
|||||||
|
|
||||||
commandExecutor.close();
|
commandExecutor.close();
|
||||||
|
|
||||||
synchronized (game) {
|
synchronized (this) {
|
||||||
game.notifyAll();
|
notifyAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
commandExecutor.executeCommand(new NewGameCommand());
|
commandExecutor.executeCommand(new NewGameCommand());
|
||||||
|
|
||||||
synchronized (game) {
|
synchronized (this) {
|
||||||
try {
|
try {
|
||||||
game.wait();
|
wait();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user