Skip to content

Commit

Permalink
Minor output tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Miki Leskinen committed Apr 24, 2012
1 parent adf3165 commit 993d810
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion countdown.scala
Expand Up @@ -18,7 +18,7 @@ val totalSeconds = minutes * minute
(1 to totalSeconds).foreach { x => (1 to totalSeconds).foreach { x =>
val secondsLeft = totalSeconds - x val secondsLeft = totalSeconds - x
val message = "%s minutes %s seconds left".format(secondsLeft / minute, secondsLeft % minute) val message = "%s minutes %s seconds left".format(secondsLeft / minute, secondsLeft % minute)
print("\r" + " " * 100 + "\r%s".format(message)) print("\r" + " " * 100 + "\r%s ".format(message))
Thread.sleep(1000) Thread.sleep(1000)
if (x == totalSeconds - minute) { if (x == totalSeconds - minute) {
"say dear %s resource, u have 1 minute left".format(client)! "say dear %s resource, u have 1 minute left".format(client)!
Expand All @@ -27,5 +27,6 @@ val totalSeconds = minutes * minute


"say dear %s resource, ur time is up".format(client)! "say dear %s resource, ur time is up".format(client)!


println
"toilet --gay time is up"! "toilet --gay time is up"!


0 comments on commit 993d810

Please sign in to comment.