Castling done, not thoroughly bug tested. Includes changes to the game struct. Can't castle through check, out of check and through pieces, or after you've moved the rook or king.
Castling done. Needs testing. So the things to look for with castling, which I think I've covered, is; can't castle out of check. Can't castle into check. Can't castle through check. Can't castle after king has moved, or the appropriate rook has moved.