private boolean isCellFree(int r, int c, ArrayList<int[]> occupiedRects)
	{
		if (getCell(r, c) != null)
			return false;

		for (int[] rect : occupiedRects) {
			if (rect[0] <= c && rect[1] <= r && rect[0] + rect[2] > c && rect[1] + rect[3] > r)
				return false;
		}
		return true;
	}