check draw

This commit is contained in:
2025-04-13 12:57:13 +02:00
parent 224a09c711
commit b336784a5d
15 changed files with 108 additions and 26 deletions

View File

@@ -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();
}