class documentation - a shitload of it
All checks were successful
Linux arm64 / Build (push) Successful in 33s

This commit is contained in:
2025-05-18 20:08:22 +02:00
parent 523eb094e1
commit 97950403a5
85 changed files with 378 additions and 94 deletions

View File

@@ -11,6 +11,9 @@ import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Move;
/**
* Create a thread in which the notifications such as Move Not Allowed, Check, Checkmate, Promotion, Surrender, etc. will be sent to update the players.
*/
public class AsyncGameDispatcher extends GameDispatcher {
private final List<GameListener> listeners;

View File

@@ -5,6 +5,9 @@ import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Move;
/**
* Dispatcher for bots, does nothing.
*/
public class EmptyGameDispatcher extends GameDispatcher {
@Override

View File

@@ -5,6 +5,10 @@ import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Move;
/**
* Abstract class, provides default implementation of GameListener methods.
* @see GameListener
*/
public abstract class GameAdapter implements GameListener {
@Override

View File

@@ -1,5 +1,8 @@
package chess.controller.event;
/**
* Abstract class, provides a dispatcher for game events.
*/
public abstract class GameDispatcher extends GameAdapter {
public abstract void addListener(GameListener listener);

View File

@@ -5,6 +5,9 @@ import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Move;
/**
* Interface for events to listen.
*/
public interface GameListener {
/**