feat: NCS-10 Implement Pawn Promotion #12

Merged
lq64 merged 20 commits from feat/NCS-10 into main 2026-03-31 22:18:14 +02:00
Showing only changes of commit e6d43be260 - Show all commits
@@ -1,6 +1,6 @@
package de.nowchess.chess.observer
import de.nowchess.api.board.{Board, Color}
import de.nowchess.api.board.{Board, Color, Square}
import de.nowchess.chess.logic.GameHistory
/** Base trait for all game state events.
@@ -51,6 +51,15 @@ case class InvalidMoveEvent(
reason: String
) extends GameEvent
/** Fired when a pawn reaches the back rank and the player must choose a promotion piece. */
case class PromotionRequiredEvent(
board: Board,
history: GameHistory,
turn: Color,
from: Square,
to: Square
) extends GameEvent
/** Fired when the board is reset. */
case class BoardResetEvent(
board: Board,