public int getBox(int r, int c){
		if(r >= size || c >= size || r < 0 || c < 0){
			System.err.println("Invalid dimentions (" + r + "," + c + ") for size " + size);
			System.exit(0);
		}
		
		return c/dimension + (r/dimension * dimension);
	}