wip: migrate backend to new game package

This commit is contained in:
Justin Lin committed 2025-04-21 22:40:11 +08:00
1 parent 1d843f7355
commit 1616f62755
94 files changed
+263 -3055

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
interface Node {
_id: string
id: string
requirements: string[]
}
@@ -9,7 +9,7 @@ export default class DAG {
private layers: number[] = []
constructor(nodes: Node[]) {
this.nodes = new Map(nodes.map((node) => [node._id, node]))
this.nodes = new Map(nodes.map((node) => [node.id, node]))
this.edges = new Set<[string, string]>()
this.nodes.forEach((_, id) => {
this.setLayer(id)