private int numNeighbors( int[] n ) {
		int result = 0;
		if ( n[NORTH] != -1 ) {
			result++;
		}
		if ( n[EAST] != -1 ) {
			result++;
		}
		if ( n[SOUTH] != -1 ) {
			result++;
		}
		if ( n[WEST] != -1 ) {
			result++;
		}
		return result;		
	}