Created
July 31, 2016 22:38
-
-
Save sebm/dd0fafec798e1bdcbb64e00e23ef6a10 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Sequence { | |
def main(args: Array[String]): Unit = { | |
val REFRESH = 100 | |
val ROCKET = "\uD83D\uDE80" | |
val EARTH = "\uD83C\uDF0E" | |
val BOOM = "\uD83D\uDD25" | |
val MAX_TICKS = 20 | |
while (true) { | |
var ticks = 0 | |
while (ticks < MAX_TICKS) { | |
Thread.sleep(REFRESH) | |
println("\033[2J\033[1;1H") | |
println(s"${" "*ticks}$ROCKET${" "*(MAX_TICKS-ticks)}$EARTH") | |
ticks += 1 | |
} | |
println("\033[2J\033[1;1H") | |
println(s"${" "*ticks}$BOOM") | |
Thread.sleep(2000) | |
} | |
} | |
} |
Author
sebm
commented
Jul 31, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment