All pieces can perform castling with any allied piece standing 3 or 4 squares horizontally away from it. All squares between the pieces performing castling must be unoccupied. Castling is allowed when in check, moving over check and with pieces that has moved previously in the game.
Example 1:
Whites king and rook are standing 4 squares away from each other. White can perform castling by either moving the king first Kc1,Rd1
Or white can perform castling by moving the rook first Rc1,Kb1
Example 2:
Whites pawns on c4 and f4 are standing 3 squares away from each other. Whites pawns can perform castling c4-e4.f4-d4
Example 3:
Whites rook and bishop are standing 4 squares away from each other. However it is not horizontal, so those pieces can not castle. Whites bishop and knight are 3 squares away from each other. However those are not horizontal next to each other either, so castling is not legal.
Event #97 Castling for Everyone
All pieces can perform castling with any allied piece standing 3 or 4 squares horizontally away from it. All squares between the pieces performing castling must be unoccupied. Castling is allowed when in check, moving over check and with pieces that has moved previously in the game.
Example 1:
Whites king and rook are standing 4 squares away from each other. White can perform castling by either moving the king first Kc1,Rd1
Or white can perform castling by moving the rook first Rc1,Kb1
Example 2:
Whites pawns on c4 and f4 are standing 3 squares away from each other. Whites pawns can perform castling c4-e4.f4-d4
Example 3:
Whites rook and bishop are standing 4 squares away from each other. However it is not horizontal, so those pieces can not castle. Whites bishop and knight are 3 squares away from each other. However those are not horizontal next to each other either, so castling is not legal.