aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--build.sbt21
-rw-r--r--src/main/scala/Example.scala12
3 files changed, 38 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d3e9111
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# Creative Scala Template
+
+This is a template project designed for people taking [Creative Scala][creative-scala].
+
+[creative-scala]: http://underscore.io/training/courses/creative-scala/
diff --git a/build.sbt b/build.sbt
new file mode 100644
index 0000000..29c1070
--- /dev/null
+++ b/build.sbt
@@ -0,0 +1,21 @@
+scalaVersion := "2.11.8"
+
+resolvers += Resolver.bintrayRepo("underscoreio", "training")
+
+initialCommands in console := """
+ |import doodle.core._
+ |import doodle.core.Image._
+ |import doodle.syntax._
+ |import doodle.jvm.Java2DCanvas._
+ |import doodle.backend.StandardInterpreter._
+ |import doodle.examples._
+ """.trim.stripMargin
+
+cleanupCommands in console := """
+ |doodle.jvm.quit()
+ """.trim.stripMargin
+
+libraryDependencies ++= Seq(
+ "underscoreio" %% "doodle" % "0.6.1",
+ "org.typelevel" %% "cats" % "0.4.1"
+)
diff --git a/src/main/scala/Example.scala b/src/main/scala/Example.scala
new file mode 100644
index 0000000..faa158a
--- /dev/null
+++ b/src/main/scala/Example.scala
@@ -0,0 +1,12 @@
+import doodle.core._
+import doodle.core.Image._
+import doodle.syntax._
+import doodle.jvm.Java2DCanvas._
+import doodle.backend.StandardInterpreter._
+
+// To use this example, open the SBT console and type:
+//
+// Example.image.draw
+object Example {
+ val image = Circle(10) on Circle(20) on Circle(30)
+}