wait a minute
This commit is contained in:
parent
231cc7b883
commit
9adefbc796
@ -1,13 +1,26 @@
|
|||||||
import { bidirectional } from 'graphology-shortest-path';
|
import { bidirectional } from 'graphology-shortest-path';
|
||||||
import * as R from "remeda";
|
import * as R from "remeda";
|
||||||
|
import u from 'updeep';
|
||||||
|
|
||||||
import { buildGraph } from './part1.js';
|
import { buildGraph } from './part1.js';
|
||||||
|
|
||||||
function finalSteam(tunnels, graph, minutesLeft, possibilities, locations, activeSteam = 0) {
|
const findMaxSteam = (tunnels,graph) => (minutesLeft, unopened, opened, activeSteam, peeps ) => {
|
||||||
|
|
||||||
if (minutesLeft <= 0) return 0;
|
if (minutesLeft <= 0) return 0;
|
||||||
|
|
||||||
if (possibilities.length === 0) return minutesLeft * activeSteam;
|
if (unopened.length === 0) return minutesLeft * activeSteam;
|
||||||
|
|
||||||
|
const next = R.first( R.sortBy(peeps, R.prop('eta')));
|
||||||
|
|
||||||
|
if( next.eta >)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalSteam(tunnels, graph, minutesLeft, possibilities, locations, activeSteam = 0) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const nextToGo = locations.filter(([time]) => !time);
|
const nextToGo = locations.filter(([time]) => !time);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user