Given a two-dimensional array of integers, a pair of row/column indexes r and c, and a string "NW", "NE", "SW" or "SE", return the neighbor in that direction, or 0 if it doesn't exist.