-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaoc.ts
More file actions
24 lines (21 loc) · 1009 Bytes
/
aoc.ts
File metadata and controls
24 lines (21 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { MenuSystem } from "./lib/MenuSystem.ts";
import { MenuActionEnum } from "./ops/MenuActionEnum.ts";
import { EmptySpace } from "./lib/EmptySpace.ts";
import { ExitAction } from "./lib/ExitAction.ts";
import { LastMenuAction } from "./lib/LastMenuAction.ts";
import { ChooseYear } from "./ops/ChooseYear.ts";
import { ChooseDay } from "./ops/ChooseDay.ts";
import { RunPuzzle } from "./ops/RunPuzzle.ts";
const config = JSON.parse(await Bun.file("config.json").text());
const menuSystem = new MenuSystem(
{
[MenuActionEnum.EmptySpace]: new EmptySpace(MenuActionEnum.EmptySpace),
[MenuActionEnum.Exit]: new ExitAction(MenuActionEnum.Exit),
[MenuActionEnum.LastMenu]: new LastMenuAction(MenuActionEnum.LastMenu),
[MenuActionEnum.ChooseYear]: new ChooseYear(MenuActionEnum.ChooseYear),
[MenuActionEnum.ChooseDay]: new ChooseDay(MenuActionEnum.ChooseDay),
[MenuActionEnum.RunPuzzle]: new RunPuzzle(MenuActionEnum.RunPuzzle),
},
config
);
menuSystem.nextAction(MenuActionEnum.ChooseYear);