checking for adjacent tiles handles tiles on the edge of the board