hadean-old/src/index.ts

12 lines
300 B
TypeScript
Raw Normal View History

2021-06-14 22:03:55 -04:00
import { Game } from './Game.js';
2021-06-16 15:26:42 -04:00
import { render } from './ui/UI.js';
2021-06-18 02:02:50 -04:00
import { ensureDirSync } from 'fs-extra';
import { parse } from 'path';
2021-06-14 22:03:55 -04:00
2021-06-18 02:02:50 -04:00
const saveFile = process.argv[2] || 'data/world01.json';
2021-06-15 20:05:07 -04:00
2021-06-18 02:02:50 -04:00
ensureDirSync(parse(saveFile).dir);
const game = Game.create(saveFile);
2021-06-14 22:03:55 -04:00
render(game);