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

@@ -29,13 +29,16 @@ final class Bishop: Piece, DiagonalMoves {
if let king = piece as? King {
delegate?.notify(.kingInCheck(self, on: king))
legalPositions.removeLast()
last = position
return
} else {
delegate?.notify(
.piecePinned(from: self, on: piece))
last = position
}
last = position
}
}
delegate?.addPieceToTarget(self, target: position)
}
}
}