-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
## sbt project compiled with Scala 3 | ||
# :memo: Archery simulator using the Montecarlo method. | ||
Homework for "Computer Simulations" class, a GUI software created with [ScalaFx](https://www.scalafx.org/), you can start installing [sbt](https://www.scala-sbt.org/). | ||
|
||
### Usage | ||
This is almost 80% pure functional, things like the view and the pseudorandom number generation can't be performed (easily) with a functional perspective. | ||
|
||
## How it works? | ||
As you know, in FP we can't just put a counter and add the results of each game or round or competitor, so we run *all the games* (by default, 20000) and put them into a list of games, later we operate over the list and create the results. | ||
|
||
### Performance? | ||
It's just trash! :sleepy: | ||
|
||
### Ejecution | ||
This project has been created with Scala 3 (also called Dotty), using sbt for the dependencies. You can compile the project with this command. | ||
``` | ||
sbt compile | ||
``` | ||
And for run the project!. | ||
``` | ||
sbt run | ||
``` | ||
|
||
This is a normal sbt project. You can compile code with `sbt compile`, run it with `sbt run`, and `sbt console` will start a Scala 3 REPL. | ||
|
||
For more information on the sbt-dotty plugin, see the | ||
[scala3-example-project](https://github.com/scala/scala3-example-project/blob/main/README.md). |