public boolean addJavaCellToPath(JavaCell javaCell, JavaPlayer player) {
		
		if(javaCell.hasDeveloper() && !player.hasDeveloperOnXY(javaCell.getX(),javaCell.getY())){
			System.out.print(javaCell.hasDeveloper());
			System.out.print(" + ");
			System.out.print(!player.hasDeveloperOnXY(javaCell.getX(),javaCell.getY()));
			System.out.println(" means: false");
			return false;
		}
		System.out.print(javaCell.hasDeveloper());
		System.out.print(" + ");
		System.out.print(!player.hasDeveloperOnXY(javaCell.getX(),javaCell.getY()));
		System.out.println(" means: not false");
		if(!"villagerice".contains(javaCell.getCellType())){
			return false;
		}
		
		int pathSize = path.size();
		LinkedList<JavaCell> temp = new LinkedList<JavaCell>();
		LinkedList<JavaCell> temp2 = new LinkedList<JavaCell>();

		for (int i = 0; i < pathSize; i++) {
			temp2.push(path.peek());
			temp.push(path.pop());
		}
		
		if(!temp.isEmpty()){
			JavaCell currentCell = temp.pop();
			int count = 0;
	
			while ((currentCell != javaCell) && count < pathSize) {
				path.push(currentCell);
				if(!temp.isEmpty())
					currentCell = temp.pop();
				count++;
			}
		}
		path.push(javaCell);
		return !(costOfDeveloperPath(path) > player.getAvailableActionPoints(false));
	}