Skip to content
Snippets Groups Projects
Commit b97a5761 authored by William Billingsley's avatar William Billingsley
Browse files

Update to Scala 3

parent 2963f7af
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,14 @@ lift_example
vagrant/.bashrc
vagrant/sbt-launch.jar
tmp
# Metals
.metals/
.bloop/
.bsp
.metals
.bloop
metals.sbt
tmp
# VSCode
.vscode
lazy val root = (project in file(".")).
settings(
name := "Boids",
version := "1.0",
scalaVersion := "2.13.1"
version := "2021.0",
scalaVersion := "3.0.0-RC1"
)
libraryDependencies += "org.scalafx" %% "scalafx" % "12.0.2-R18"
libraryDependencies += "org.typelevel" %% "squants" % "1.6.0"
libraryDependencies += "org.scalactic" %% "scalactic" % "3.1.1"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % "test"
libraryDependencies += "org.scala-lang.modules" %% "scala-swing" % "3.0.0"
libraryDependencies += "org.scalameta" %% "munit" % "0.7.22" % Test
testFrameworks += new TestFramework("munit.Framework")
sbt.version=1.3.8
sbt.version=1.4.9
// This tells SBT to load the SBT plugin for Scala 3 (codenamed dotty)
// Because Scala 3 is still in "developer preview", its compiler is provided to sbt by a plugin
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
......@@ -22,9 +22,8 @@ object Simulation {
/** When the boids are startled, the strength of the vector that is applied to each of them */
val startleStrength:Double = Boid.maxSpeed
val startleFunction:Boid => Vec2 = {
???
}
/** A function that will "startle" a boid */
def startleFunction(b:Boid):Vec2 = ???
/** A mutable queue containing the last `frameMemory frames` */
val queue:mutable.Queue[Seq[Boid]] = mutable.Queue.empty[Seq[Boid]]
......@@ -60,7 +59,8 @@ object Simulation {
def current = ???
/** Generates boids in the centre of the simulation, moving at v=1 in a random direction */
def explosionOfBoids(i:Int):Seq[Boid] = ???
def explosionOfBoids(i:Int):Seq[Boid] =
???
/** Pushes a state into the queue */
def pushState(boids:Seq[Boid]):Seq[Boid] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment