Fix All Side Checks For Pawns Close To Edge

Fix all side checks for pawns that are close to the edge of the board
because the check goes to the next cell if there is no cell left on the
sides then it should skip it.