This commit is contained in:
2025-04-18 22:19:47 +02:00
parent 4a58136afe
commit dd6e033528
12 changed files with 89 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
package chess.controller.event;
import chess.controller.commands.PromoteCommand.PromoteType;
import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Move;
@@ -57,5 +58,13 @@ public class EmptyGameDispatcher extends GameDispatcher {
@Override
public void onWin(Color winner) {
}
@Override
public void onCastling(boolean bigCastling) {
}
@Override
public void onPawnPromoted(PromoteType promotion) {
}
}

View File

@@ -50,6 +50,6 @@ public abstract class GameAdaptator implements GameListener {
public void onCastling(boolean bigCastling) {}
@Override
public void onPawnPromoted(PromoteType promotion, Color player) {}
public void onPawnPromoted(PromoteType promotion) {}
}

View File

@@ -100,8 +100,8 @@ public class GameDispatcher implements GameListener {
}
@Override
public void onPawnPromoted(PromoteType promotion, Color player) {
asyncForEachCall((l) -> l.onPawnPromoted(promotion, player));
public void onPawnPromoted(PromoteType promotion) {
asyncForEachCall((l) -> l.onPawnPromoted(promotion));
}
public void stopService() {

View File

@@ -98,6 +98,6 @@ public interface GameListener {
* @param promotion the type of promotion
* @param player the player who promoted the pawns
*/
void onPawnPromoted(PromoteType promotion, Color player);
void onPawnPromoted(PromoteType promotion);
}