This commit is contained in:
cdricms
2024-09-16 15:20:02 +02:00
parent 8335db5888
commit b04ecceb9f
5 changed files with 32 additions and 4 deletions

View File

@@ -76,6 +76,12 @@ public class Board: CustomStringConvertible, EventDelegate {
func notify(_ event: Event) {
#warning("Not implemented")
switch event {
case .kingInCheck(let piece, let king):
king.insertThreat(piece)
case .piecePinned(let p1, let p2):
break
}
}
internal func addPieceToTarget(_ piece: Piece, target: Square.Position) {