2 exec scalas "$0" -q "$@"
6 logLevel := Level.Error
8 logLevel in Global := Level.Error
10 scalaVersion := "2.9.2"
12 libraryDependencies ++= Seq(
13 "asm" % "asm-all" % "3.3.1",
14 "org.picocontainer" % "picocontainer" % "2.13.6",
15 "org.nlogo" % "NetLogo" % "5.2.0" from "http://ccl.northwestern.edu/netlogo/5.2.0/NetLogo.jar"
19 import org.nlogo.headless.HeadlessWorkspace
22 import org.nlogo.util.Utils.url2String
24 import collection.JavaConversions._
26 System.out.println("----")
27 val workspace = HeadlessWorkspace.newInstance
28 workspace.silent = true
29 workspace.openFromSource(url2String("file:resources/empty55.nlogo"))
31 val commands = io.Source.stdin.getLines.mkString("\n")
33 workspace.mainRNG.setSeed(15)
34 workspace.runCompiledCommands(new api.SimpleJobOwner("test", workspace.world.mainRNG, classOf[api.Observer]), workspace.compileCommands(commands))
36 workspace.exportView("scala.png", "PNG")