world titles
This commit is contained in:
@@ -114,9 +114,9 @@ structure Graph (α β : Type) [inst : BEq α] [inst : Hashable α] where
|
||||
edges: Array (α × α) := {}
|
||||
deriving Inhabited
|
||||
|
||||
instance [inst : BEq α] [inst : Hashable α] [ToJson α] : ToJson (Graph α β) := {
|
||||
instance [inst : BEq α] [inst : Hashable α] [ToJson α] [ToJson β] : ToJson (Graph α β) := {
|
||||
toJson := fun graph => Json.mkObj [
|
||||
("nodes", toJson (graph.nodes.toArray.map Prod.fst)),
|
||||
("nodes", toJson (graph.nodes.toArray.map Prod.snd)),
|
||||
("edges", toJson graph.edges)
|
||||
]
|
||||
}
|
||||
@@ -216,6 +216,10 @@ structure World where
|
||||
levels: HashMap Nat GameLevel := {}
|
||||
deriving Inhabited
|
||||
|
||||
instance : ToJson World := ⟨
|
||||
fun world => Json.mkObj [("name", toJson world.name), ("title", world.title)]
|
||||
⟩
|
||||
|
||||
/-! ## Game -/
|
||||
|
||||
structure Game where
|
||||
|
||||
@@ -10,3 +10,7 @@ import TestGame.Levels.Implication.L09_Iff
|
||||
import TestGame.Levels.Implication.L10_Apply
|
||||
import TestGame.Levels.Implication.L11_Rw
|
||||
import TestGame.Levels.Implication.L12_Summary
|
||||
|
||||
Game "TestGame"
|
||||
World "Implication"
|
||||
Title "Meer der Implikationen"
|
||||
|
||||
@@ -7,3 +7,7 @@ import TestGame.Levels.Predicate.L06_Exists
|
||||
import TestGame.Levels.Predicate.L07_Forall
|
||||
import TestGame.Levels.Predicate.L08_PushNeg
|
||||
import TestGame.Levels.Predicate.L09_Summary
|
||||
|
||||
Game "TestGame"
|
||||
World "Predicate"
|
||||
Title "Reich der Prädikate"
|
||||
|
||||
@@ -11,3 +11,7 @@ import TestGame.Levels.Proposition.L10_And
|
||||
import TestGame.Levels.Proposition.L11_Or
|
||||
import TestGame.Levels.Proposition.L12_Or
|
||||
import TestGame.Levels.Proposition.L13_Summary
|
||||
|
||||
Game "TestGame"
|
||||
World "Proposition"
|
||||
Title "Land der Proposititionen"
|
||||
|
||||
Reference in New Issue
Block a user