Pawns will not go out of bounds when moving

added a check to make sure that the pawns don't go outside the index of
the chessboard.