check draw
This commit is contained in:
@@ -10,7 +10,7 @@ import chess.model.Color;
|
||||
import chess.model.Coordinate;
|
||||
import chess.model.Move;
|
||||
|
||||
public class GameDispatcher implements GameListener{
|
||||
public class GameDispatcher implements GameListener {
|
||||
|
||||
private final List<GameListener> listeners;
|
||||
private final ExecutorService executor;
|
||||
@@ -88,6 +88,11 @@ public class GameDispatcher implements GameListener{
|
||||
asyncForEachCall((l) -> l.onMoveNotAllowed(move));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw() {
|
||||
asyncForEachCall((l) -> l.onDraw());
|
||||
}
|
||||
|
||||
public void stopService() {
|
||||
this.executor.shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user