Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zaharidichev
Last active May 16, 2017 09:00
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/ca07069b0bd2856b06dbef8b1ef4f18c to your computer and use it in GitHub Desktop.
Save zaharidichev/ca07069b0bd2856b06dbef8b1ef4f18c 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(x:Int, y:Int, color: Color)
def main(args: Array[String]): Unit = {
val boardOfRooks = for {
x <- 1 to 2048
y <- 1 to 2048
} yield Rook(x,y,White)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment