[node] factorize sortByPrice
This commit is contained in:
parent
09537408a5
commit
3306159369
3 changed files with 21 additions and 9 deletions
|
@ -7,7 +7,7 @@ import {
|
|||
} from '../lib/utils.ts';
|
||||
import { Ship } from '../lib/ships.ts';
|
||||
|
||||
// example ctx { ship: {XXX}, keep: 'SILVER_ORE' }
|
||||
// example ctx { ship: {XXX}, good: 'SILVER_ORE' }
|
||||
export async function sell(ship: Ship, good: string): Promise<Ship> {
|
||||
outer: while(true) {
|
||||
const waypoint = await libSystems.waypoint(ship.nav.waypointSymbol);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue