Last active
August 29, 2015 14:06
-
-
Save AndrewReitz/3d28e792215146c05844 to your computer and use it in GitHub Desktop.
Random Dots
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
def randDots:String = { | |
val nLines = 100 | |
val width = 80 | |
Seq.range(0, nLines*width).map(a=>if(scala.util.Random.nextBoolean())"." else " ").grouped(width).map(_.mkString("")).mkString("\n") | |
} | |
while(true){ | |
println(randDots) | |
Thread.sleep(scala.util.Random.nextInt(5000)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment