diff options
author | Julien Dessaux | 2024-05-17 22:01:29 +0200 |
---|---|---|
committer | Julien Dessaux | 2024-05-17 22:01:29 +0200 |
commit | ccbfd9deb947c776782b80229be4513485321a88 (patch) | |
tree | 7f7f5e7816cabe4a88ed9c66ca9b29762fccb1e5 /nodejs/main.ts | |
parent | [node] Added agent class, and fixed contract updates (diff) | |
download | spacetraders-ccbfd9deb947c776782b80229be4513485321a88.tar.gz spacetraders-ccbfd9deb947c776782b80229be4513485321a88.tar.bz2 spacetraders-ccbfd9deb947c776782b80229be4513485321a88.zip |
[node] fixed and optimized contracting
Diffstat (limited to 'nodejs/main.ts')
-rwxr-xr-x | nodejs/main.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nodejs/main.ts b/nodejs/main.ts index 2d15c60..c4f205d 100755 --- a/nodejs/main.ts +++ b/nodejs/main.ts @@ -1,10 +1,17 @@ import * as autoContracting from './automation/contracting.ts'; //import * as autoExploring from './automation/exploration.ts'; import * as autoInit from './automation/init.ts'; +import { getAgent } from './lib/agent.ts'; import { getShips } from './lib/ships.ts'; +import { debugLog, send } from './lib/api.ts'; + +//debugLog(await send({endpoint: '/'})); await autoInit.init(); -const ships = await getShips(); +debugLog(getAgent()); + +debugLog(await getAgent().purchaseShip()); -await autoContracting.run(ships[0]); // dedicate the command ship to running contracts +//const ships = getShips(); +//await autoContracting.run(ships[0]); // dedicate the command ship to running contracts //autoExploring.init(); |