First, an image has been added to the problem which may help visualize the chessboard.
Second for a strategy, I would identify the most restrictive type of position first. That's the corners. There are only 4 of those. After that, the borders. Finally, if a position isn't a corner or a border, it must be on the inside. If you compare in that order, then you don't need a comparison for the inside. The inside is the else case.