Skip to content

Instantly share code, notes, and snippets.

@ppurang
Created April 14, 2012 07:58
Show Gist options
  • Save ppurang/2382768 to your computer and use it in GitHub Desktop.
Save ppurang/2382768 to your computer and use it in GitHub Desktop.
build.sbt for trivia
name := "coderetreat-trivia"
version := "0.0.1"
organization := "org.purang.net"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"org.scalaz" % "scalaz-core_2.9.1" % "6.0.3" withSources(),
"org.scalatest" % "scalatest_2.9.1" % "1.6.1" % "test"
)
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked")
cancelable := true
resolvers ++= Seq("Local Maven Repository" at "file://" + Path.userHome + "/.m2/repository", "Local Ivy Repository" at "file://" + Path.userHome + "/.ivy2/local")
//, "Local Ivy Cache" at "file://" + Path.userHome + "/.ivy2/cache"
@ppurang
Copy link
Author

ppurang commented Apr 14, 2012

def whichPlayerWon = if(didPlayerWin) {
currentPlayer match {
case 0 => players.get(players.size() - 1)
case _ => players.get(currentPlayer - 1)
}
} else {
"no winner yet"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment