public static double completable(Game game, int nodeIndex, MOVE initialMove) {
		EnumMap<GHOST, int[]> ghostJunctionPaths = getGhostJunctionPaths(game);
		int remainingPills = game.getNumberOfActivePills() + game.getNumberOfActivePowerPills();
		int safelyEdiblePills = 0;
		int[] pathToJunction = getJunctionPath(game, nodeIndex, initialMove);
		for (int i = 0; i < pathToJunction.length; i++) {
			if (!reachableByGhost(game, pathToJunction[i], i + EAT_DISTANCE, ghostJunctionPaths)) {
				int pillIndex = game.getPillIndex(pathToJunction[i]);
				int powerPillIndex = game.getPowerPillIndex(pathToJunction[i]);
				if (pillIndex != -1 && game.isPillStillAvailable(pillIndex) || powerPillIndex != -1 && game.isPowerPillStillAvailable(powerPillIndex)) {
					safelyEdiblePills++;
				}
			}
			else {
				break;
			}
		}

		return safelyEdiblePills == remainingPills ? 1 : 0;
	}