If the computer is not allowing it, then all the conditions are not being met in order to do it.
Make sure:
Your are not in check,
The King will not be in check if he does castle,
The King is not moving across an attacked square,
The rook your are castling with has not already moved.
Can someone please tell me how to castle my king. I know what castling is and how its done, but the computer wont allow it?!? Its requires 2 moves but the computer only allows one !?! I cant work it out. Whats the trick? Thanks