implemented proper castling evaluation