Castling has rules. The king and that rook must not have moved, and every square between them must be empty.
8
7
6
5
4
3
2
1a
b
c
d
e
f
g
h