Skip to content

Commit

Permalink
docs: more details in how to run a simple simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
cric96 committed May 21, 2024
1 parent 8f331b8 commit 89120b2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/guide/quick.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ More details about the library can be found in the [API documentation](https://s
## Example

### Requirements
- Java 11
- SBT
- Java 11: [installation guide](https://openjdk.org/install/)
- SBT: [installation guide](https://www.scala-sbt.org/1.x/docs/Setup.html)

### Steps
1) Create a new SBT project with the following `build.sbt` file:
Expand All @@ -33,12 +33,12 @@ val alchemistClass = "it.unibo.alchemist.Alchemist"
lazy val root = (project in file("."))
.settings(
name := "macro-swarm-demo",
libraryDependencies += "it.unibo.scafi" %% "macro-swarm-alchemist" % "1.4.0",
libraryDependencies += "it.unibo.scafi" %% "macro-swarm-alchemist" % "1.5.1",
Compile / mainClass := Some(alchemistClass),
run / mainClass := Some(alchemistClass)
)

addCommandAlias("runAlchemist", "run src/main/yaml/main.yaml")
addCommandAlias("runAlchemist", "run run src/main/yaml/main.yaml")
```

2) Create a main app like the following:
Expand Down Expand Up @@ -90,6 +90,10 @@ deployments:
parameters: [-500, -500, 500, 500, 300, 300, 25, 25]
programs: [ *program, *move ] # Add the behaviour
```
After that, typing `sbt runAlchemist` in the terminal, you should see a window with a simulation started.
To effectively start the simulation, please press the key <kbd>p</kbd> on the keyboard.

![](https://user-images.githubusercontent.com/23448811/224010877-6f5c9d36-d348-4343-8b66-19f78778297e.gif)


## Related Tools
Expand Down

0 comments on commit 89120b2

Please sign in to comment.