There are two movements that the king currently can do, which the king can't do.
Castling:
One of the rules with castling is that the king can't jump over a tile which is being attacked by the enemy.
Check/Checkmate:
The king can't capture a piece, which is in a tile that is being attacked by another piece. As this will put the king into check again.
I need to restrict these movements, so that the king is unable to make these moves.
There are two movements that the king currently can do, which the king can't do.
Castling: One of the rules with castling is that the king can't jump over a tile which is being attacked by the enemy.
Check/Checkmate: The king can't capture a piece, which is in a tile that is being attacked by another piece. As this will put the king into check again.
I need to restrict these movements, so that the king is unable to make these moves.