How to not let the chess kings move into each other’s square in pygame?
I’m making a chess game using pygame, most of the problems and bugs are solved hopefully but there’s only one more that’s bugging me out. In chess, kings cannot move to other king’s adjacent squares. I have a function called in_check it basically returns False if with the provided move, the king will be in check, i actually hopped that it’ll work as it is for the kings’ moves too but it only worked for any other piece. So i upgraded it and added a few more codes as you can see here:
How to not let the chess kings move into each other’s square in pygame?
I’m making a chess game using pygame, most of the problems and bugs are solved hopefully but there’s only one more that’s bugging me out. In chess, kings cannot move to other king’s adjacent squares. I have a function called in_check it basically returns False if with the provided move, the king will be in check, i actually hopped that it’ll work as it is for the kings’ moves too but it only worked for any other piece. So i upgraded it and added a few more codes as you can see here:
How to not let the chess kings move into each other’s square in pygame?
I’m making a chess game using pygame, most of the problems and bugs are solved hopefully but there’s only one more that’s bugging me out. In chess, kings cannot move to other king’s adjacent squares. I have a function called in_check it basically returns False if with the provided move, the king will be in check, i actually hopped that it’ll work as it is for the kings’ moves too but it only worked for any other piece. So i upgraded it and added a few more codes as you can see here:
How to not let the chess kings move into each other’s square in pygame?
I’m making a chess game using pygame, most of the problems and bugs are solved hopefully but there’s only one more that’s bugging me out. In chess, kings cannot move to other king’s adjacent squares. I have a function called in_check it basically returns False if with the provided move, the king will be in check, i actually hopped that it’ll work as it is for the kings’ moves too but it only worked for any other piece. So i upgraded it and added a few more codes as you can see here: