Open Gamaya0 opened 9 months ago
The function includes squares that any piece is defending/attacking, whether the square is occupied or not.
Essentially, the question you are asking the function is "If I put an opponent piece on this square, can the player take it?"
For d7, in this case, the answer is yes, in three different ways.
Here the SquareIsAttackedByOpponent returns true, although the sqaure isn't attacked. Am I doing something wrong here?