Added castling moves and fixed the IsSquareAttacked function