mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
wip: migrate backend to new game package
This commit is contained in:
1 parent
1d843f7355
commit
1616f62755
94 files changed
+263
-3055
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user