Launch rocket with countdown and acceleration in stdout: Difference between revisions

m
(→‎{{header|Perl 6}}: Add a Perl 6 example)
Line 262:
fcn cursor2Col(n){ print("\e[%dG".fmt(n)) }
 
fcn main__main__{
tall,tall := rocket.counts(), tall[tall.find("\n")+1];
cls(); print(rocket); cursorUp(tall);
Line 273:
// liftoff
ms:=1.0; // 1 sec
foreach n in do([2..25]){
println(flame); Atomic.sleep(ms);
ms=(ms - 0.04).max(0); // 40 milliseconds faster than last time
}
}();</lang>
{{out}}
<pre>
Anonymous user