-workspace.openFromSource(url2String(api.ModelReader.emptyModelPath))
-workspace.runCompiledCommands(new api.SimpleJobOwner("test", workspace.world.mainRNG, api.AgentKind.Observer), workspace.compileCommands("resize-world -2 2 -2 2 crt 1", api.AgentKind.Observer))
-mirror.Mirrorables.allMirrorables(workspace.world).map( x => {
- System.out.print("(")
- System.out.print(x.kind)
- System.out.print(" ")
- System.out.print(x.agentKey.id)
- System.out.print(" (")
- x.kind.Variables.values.toSeq.map( k => {
- System.out.print("(" + k + " ")
- x.getVariable(k.id) match {
- case s: java.lang.String => System.out.print("\"s\"")
- case v => System.out.print(v)
- }
- System.out.print(") ")
- })
- System.out.println(")")
-
- })
+workspace.openFromSource(url2String("file:resources/empty.nlogo"))
+
+val input = io.Source.stdin.getLines.mkString("\n").split("\\@\\#\\$\\#\\@\\#\\$\\#\\@")
+val commands = input(0)
+
+workspace.mainRNG.setSeed(15)
+if(commands.length > 0) {
+ workspace.runCompiledCommands(new api.SimpleJobOwner("test", workspace.world.mainRNG, classOf[api.Observer]), workspace.compileCommands(commands))
+}
+if(input.length > 1) {
+ val reporter = input(1)
+ System.out.println(org.nlogo.api.Dump.logoObject(workspace.runCompiledReporter(new api.SimpleJobOwner("test", workspace.world.mainRNG, classOf[api.Observer]), workspace.compileReporter(reporter))))
+}
+
+workspace.world.exportWorld(new java.io.PrintWriter(System.out, true), true)
+System.out.println(org.nlogo.headless.Checksummer.calculateChecksum(workspace.world.exportWorld(_, true)))