Created
May 16, 2017 09:19
-
-
Save zaharidichev/7001829baa3e18c922cac0b1239e04e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object PlacingRooks { | |
sealed trait Color | |
case object White extends Color | |
case object Black extends Color | |
case class Rook[@specialized(Int) 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