@Override
	protected void move() {
		optimiseList();
		isRunning = true;
		stepsToSolve = 0;
		ArrayList<Box> boxesToMove = new ArrayList<Box>();
		int personsFree;
		while(boxconfig.boxes.size() > 0) { /* One of this loop is one "round"    */
			personsFree = personsMax;       /* Resets the number of free persons */
			for (Box box : boxconfig.boxes) {
				if (box.isTopBox() && box.getWeight() <= personsFree) {
					boxesToMove.add(box);
					personsFree -=  box.getWeight();
				}
			}
			stepsToSolve++; /* Counts the number of steps to solve the algorithm */
			String tempString = personsMax - personsFree + " st personer flyttar boxarna ";
			for (Box box : boxesToMove) {
				boxconfig.remove(box);
				tempString += box.getName();
				if (boxesToMove.indexOf(box) != boxesToMove.size() - 1) {
					tempString += ", ";
				}
			}
			boxesToMove.clear();

			if (!silent) { /* Shall print out it one by one */
				mainText.append(tempString + "\n");

				try {
					Thread.sleep(AlgorithmPart1.TIMEINMS);
				} catch (InterruptedException e) {
					e.printStackTrace();

				}
			}
		}
		isRunning = false;	
	}