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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Time::HiRes 'usleep'; | |
$|++; # force auto-flush (see perldoc perlvar) | |
my $distance = 1 + int(rand(49)); | |
my @stones = ("_","-"); |
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
10 PRINT "Loading..." : PRINT : S% = 1 : E% = 60 : FOR T% = S% TO E% | |
20 SLEEP 0.1 : REM YOUR PROGRAM LOGIC HERE, ADJUST S% AND E% VALUES | |
30 MD = INT((T%/E%*100)/10) : ML = 10 - INT((T%/E%*100)/10) : P% = INT(T%/E%*100) | |
40 IF O% <> P% THEN GOTO 50 : ELSE IF P% <> 100 THEN NEXT T% | |
50 PRINT CHR$(27) "[A" "[" STRING$(MD, "#") STRING$(ML, " ") "] " STR$(P%) "%" : O% = P% : NEXT T% | |
60 PRINT CHR$(27) "[A" CHR$(27) "[18C" "Done" |
NewerOlder