3d promote (Fixes #14)
All checks were successful
Linux arm64 / Build (push) Successful in 35s

This commit is contained in:
2025-05-18 12:18:09 +02:00
parent fd9aabb6a1
commit 523eb094e1
11 changed files with 82 additions and 37 deletions

View File

@@ -101,8 +101,8 @@ public class AsyncGameDispatcher extends GameDispatcher {
}
@Override
public void onPawnPromoted(PromoteType promotion) {
asyncForEachCall((l) -> l.onPawnPromoted(promotion));
public void onPawnPromoted(PromoteType promotion, Coordinate coordinate) {
asyncForEachCall((l) -> l.onPawnPromoted(promotion, coordinate));
}
@Override

View File

@@ -64,7 +64,7 @@ public class EmptyGameDispatcher extends GameDispatcher {
}
@Override
public void onPawnPromoted(PromoteType promotion) {
public void onPawnPromoted(PromoteType promotion, Coordinate coordinate) {
}
@Override

View File

@@ -50,6 +50,6 @@ public abstract class GameAdapter implements GameListener {
public void onCastling(boolean bigCastling, Move kingMove, Move rookMove) {}
@Override
public void onPawnPromoted(PromoteType promotion) {}
public void onPawnPromoted(PromoteType promotion, Coordinate coordinate) {}
}

View File

@@ -99,8 +99,8 @@ public interface GameListener {
* Invoked when a pawn is promoted
*
* @param promotion the type of promotion
* @param player the player who promoted the pawns
* @param coordinate the coordinate of the old pawn
*/
void onPawnPromoted(PromoteType promotion);
void onPawnPromoted(PromoteType promotion, Coordinate coordinate);
}