To make this work, the rook can only have the king's position, if neither the king nor that rook have moved.
How do you differentiate between "never moved" and "moved but moved back"?
How do you differentiate between "never moved" and "moved but moved back"?