yes
This commit is contained in:
@@ -29,13 +29,16 @@ final class Rook: Piece, LinearMoves {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user