private List getNeighbors(int location) {
		
		List neighbors = new ArrayList();

		// if location is not on left side, then add neighbors from left
		if (location%(10)!=0) {
			neighbors.add(new Integer(location-1));
			if (location>9) {
				neighbors.add(new Integer(location-11));
			}
			if (location<90) {
				neighbors.add(new Integer(location+9));
			}
		}

		// if location is not on right side, then add neighbors from right
		if ((location+1)%(10)!=0){ 
			neighbors.add(new Integer(location+1));
			if (location>9) {
				neighbors.add(new Integer(location-9));
			}

			if (location<90) {
				neighbors.add(new Integer(location+11));
			}
		}

		// if location is not on top, then add neighbors from top
		if (location>9) {  
			neighbors.add(new Integer(location-10));
		}

		// if location is not on bottom, then add neighbors from bottom
		if (location<90) { 
			neighbors.add(new Integer(location+10));
		}

		return neighbors;
	}