working
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user