added pawns changing on new row, fixed bugs in castle code
added pawns changing on new row, fixed bugs in castle code