public boolean remove(Unit unit) {
		int tolerance = 20;
		int remaining = building.getRemainingTrainTime();
		boolean buildIsDone = false;
		if (remaining != 0) {
			for (UnitType type : ableToBuild) {
				if (type.buildTime() - tolerance <= remaining
						&& remaining <= type.buildTime()) {
					buildIsDone = true;
					break;
				}
			}
		} else {
			buildIsDone = true;
		}

		if (!buildIsDone || queue.isEmpty() || unit.getType() != queue.get(0)) {
			return false;
		}
		queue.remove(0);
		return true;
	}