Skip to content

Instantly share code, notes, and snippets.

@zaharidichev
Created May 16, 2017 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaharidichev/6ed84ad20d4fc29aecb8bb4c07e8dbc6 to your computer and use it in GitHub Desktop.
Save zaharidichev/6ed84ad20d4fc29aecb8bb4c07e8dbc6 to your computer and use it in GitHub Desktop.
object PlacingRooks {
sealed trait Color
case object White extends Color
case object Black extends Color
case class Rook[T](x:T, y:T, color: Color)
def main(args: Array[String]): Unit = {
val boardOfRooks = for {
x <- 1 to 2048
y <- 1 to 2048
} yield Rook[Int](x,y,White)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment