The issue was that the test for being already in check was done with the King taken off the board
Why would you take the King off the board for this? Couldn't this cause false positives and false negatives from divergent pieces like Pawns or Cannons?
This was a bug that did not yet express itself. A Checker diagonally adjacent to the enemy King would not deliver check if a friendly piece was immediately behind that King, blocking the landing square. But that blocking piece would then essentially be pinned, and its moves should not be highlighted.
The code I use avoids this by trying each pseudo-legal move and checking whether any piece in the new position is checking the King.
Why would you take the King off the board for this? Couldn't this cause false positives and false negatives from divergent pieces like Pawns or Cannons?
The code I use avoids this by trying each pseudo-legal move and checking whether any piece in the new position is checking the King.