Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

<b>Perl Lazy Skateboarding</b>

by Sigmund (Pilgrim)
on Oct 07, 2001 at 17:35 UTC ( [id://117304]=CUFP: print w/replies, xml ) Need Help??

Following to my previous node Perl Lazy Surfing i decided to expand that idea and satisfy the needs of those who, being forced to live in places where are no waves, decided to surf the asphalt...here's my Perl Lazy Skateboarding: more specialities, more detail, and a little stupid childish obfu to print out a funny message in case of a highscore!
Being not a serious obfu it must be taken "as is", just not to reveal the surprise.
Also added a curious formatting to remind a skateboard. What to say? Useless and funny as every nerdish thing...but after all one of the virtues of the Perl programmer is Laziness!!!

Update:
I corrected the "300" Hiscore limit to "600"!!!
You are WAY too lucky!!!

Enjoy!

#!/usr/bin/perl -w use strict; # ain't nothin' to do??? # Go Perl Lazy Skateboarding!!!! my $deck = int rand 3; my $wheels = int rand 3; my $trucks = int rand 3; my $spot = int rand 3; my $risk; my @d = ( "a Powell Street Deck","an Old School Board", "a Downhill Longboard"); my @w = ( "Small Hard Wheels","Medium Sized/Tough Wheels", "Large Soft Wheels"); my @t = ( "and Narrow Trucks","and Regular Trucks", "and Wide Trucks"); my @s = ( "Randomly Freestyling", "On the Ramp", "Speeding Downhill"); system 'clear'; print "\n-=# Welcome to Perl Lazy Skateboarding #=-\nby Sigmund \n\n"; print "You got:\n"; sleep 1; print $d[$deck]."\n"; sleep 1; print $w[$wheels]."\n"; sleep 1; print $t[$trucks]."\n"; sleep 1; print "and you decided to go ".$s[$spot]."\n"; sleep 2; $deck *= 2; if (($deck <=2 && $spot <=1)||($deck >=2 && $spot >=1)) { $risk = $deck + $spot; } else { die "Impossible Task, Man! You must be fool !!!\n\n"; } my @comment = ( "Great Nineties ! Smart Guy !", "Risky Business, Man!", "A Man from the Eighties wanna be modern ?!?", "Nothin' to say...Eighties' deck, Eighties' Soul !!!", "You already tried killin'yourself fifteen years ago !", "Got Nostalgy of the 60's ?", "Perfect. That ain't Surf, but Speed gets ya high as well !!" ); print $comment[$risk]."\n"; my @stricks = ("","Ollie","Kickflip","Wheelie", "Streetplant","Grind","Boneless"); my @rtricks = ("","Disaster","Axle-Stall","Rock&Roll", "Handplant","Slide","Airwalk"); my @dtricks = ("","Carve","Drop Knee","Board Walk", "Hang Ten","Nose Wheelie","XXX"); my $control = int rand 7; $wheels *= 10; $trucks *= 10; my $total = 0; my $score = 0; sub street { $score = (45-$wheels-$trucks) if $risk == 0; $score = (55-$wheels-$trucks) if $risk == 2; while ($control != 0) { $total += $score; print "Hey, good ".$stricks[$control]."\n"; sleep 1; $control = int rand 7; } print "You Crashed!\n"; } sub ramp { $score = (25+$wheels-$trucks) if (($risk == 1) || ($risk == 5)); $score = (35+$wheels-$trucks) if $risk == 3; while ($control != 0) { $total += $score; print "Hey, good ".$rtricks[$control]."\n"; sleep 1; $control = int rand 7; } print "You did fall!\n"; } sub downhill { $score = (5+$wheels+$trucks) if $risk == 4; $score = (15+$wheels+$trucks) if $risk == 6; while ($control != 0) { $total += $score; print "Hey, good ".$dtricks[$control]."\n"; sleep 1; $control = int rand 7; } print "You Slipped!\n"; } sub bigscore { my @gr =("#"x 80 ,"\n" ,"#" x6," "x14,"#"x8," "x8,"#"x6," "x7,"#"x7, " "x6,"#"x18,"\n","#"x3," "x21,"#"x5," "x6,"#"x6," "x6,"#"x 6,"", " "x5,"#"x3," "x6,"#"x13,"\n","#"x3," "x6,"#"x7," "x9,"#"x 6,"" , " "x5,"#"x4," "x4,"#"x8," "x4,"#"x7," "x5,"#"x12,"\n","#" x5,""x3, " "x5,"#"x11," "x5,"#"x5," "x5,"#"x3," "x3,"#"x10," " x4,"#" x 7, " "x4,"#"x13 ,"\n","#"x8," "x6,"#"x18," "x9,"#" x12," "x4,"#"x5, " "x3,"#" x15 ,"\n","#"x11," "x6,"#"x16," " x 7,"#"x 15,"#" x 0, " "x9,"#"x16,"\n","#"x14," " x9,"#"x 10 , " " x 9, "#"x 11, " "x4 ,"#"x4," "x5,"#"x14, "\n","" ,"#"x20 ," "x7,"#"x6, " "x5 ,"#"x2," "x4,"#"x8," "x 4,"#"x7," " x4,"#" x 13, "\n","#"x5," " x2,"#"x15," " x6,"#"x4," "x5,"#" x 4," "x5,""x 79, "#"x7," "x4,"#" x6," " x5,"#"x12,"\n","#"x5," "x7,"#"x8," "x 6, "#"x6," "x 4, "#" x6," "x6,"#" x5," "x5,"#"x3," "x5, "#"x14,"\n","#" x7, " "x 16,"#" x7," "x7,"#"x7," "x 7 ,"#"x4, " "x9,"#"x16,"\n","#"x80, "\n","#"x21," "x3,"#"x16," "x3,"#"x9, " "x9,"#"x19,"\n","#"x3," "x4,"#"x3," "x3,"#", " " x3,"#"x3," "x 10, "#"x10," " x3,"#"x8," "x3, "#" x 26 ,"\n","#"," "x2,"#" x 4 , " "x2, "#"," "x 4,"#" x2," "x2,"#"x4," "x3,"#"x3," "x8,"#"x13," "x4,"#"x27, "\n","#"," "x2,"#"x 4 , " " x 2 ,"#"," " x3,"#"x9," "x4,"#"x7," "x5, "#"x3," "x3,"#"x5," "x3,"#" x5," "x7,"#"x 16,"\n","#"x2," "x5,"#"x3, " "x3,"#"x10," "x3,"#"x9," "x3,"#"x3," "x3,"#"x5," "x12,"#"x19,"\n", "#"x23," "x4,"#"x8," "x4,"#"x3," "x3,"#"x4," "x5,"#"x26,"\n","#"x24, " "x3,"#"x7," "x4,"#"x4," "x3,"#"x5," "x4,"#"x26,"\n","#"x 24," "x4, "#"x4," "x4,"#"x6," "x3,"#"x7," "x5,"#"x4," "x5,"#"x14,"\n","#"x 24, " "x9,"#"x5,"#"x4," "x3,"#"x9," "x10,"#"x16,"\n","#"x71,"#"x9,"\n"); print "You Made a High Score! In three seconds you'll see the secret message!!!\n"; sleep 3; foreach (@gr) { print; } } my @sp = ("street","ramp","downhill"); eval $sp[$spot]; print "Today's Score is: ".$total."\n\n"; bigscore if $total > 600;


SiG

perl -le 's ssSss.s sSsSiss.s s$sSss.ss .$s\107ss.print'

Replies are listed 'Best First'.
Re: bPerl Lazy Skateboarding/b
by modabasi (Novice) on Oct 07, 2001 at 23:02 UTC
    Great fun ! I was amused by the first script like a child, and now this "Skateboarding Fantasy" thing ate my 10 minutes tying to catch a score over 300! :)) Sorry, I had to hack it to see the obfu, I hope you don't mind..

    Cheers, keep on rolling !

    Mustafa Odabasi
    modabasi@virgo.com.tr

      Ha, I beat you on the third trip! :)

      -=# Welcome to Perl Lazy Skateboarding by Sigmund #=- You got: an Old Scool Board Medium Sized/Tough Wheels and Narrow Trucks and you decided to go Randomly Freestyling A Man from the Eighties wanna be modern ?!? Hey, good Kickflip Hey, good Wheelie Hey, good Kickflip Hey, good Boneless Hey, good Kickflip Hey, good Kickflip Hey, good Streetplant Hey, good Streetplant Hey, good Grind Hey, good Ollie Hey, good Wheelie Hey, good Streetplant You Crashed! Today's Score is: 540 You Made a High Score! In three seconds you'll see the secret message!!!

      (sorry, it's a secret! :))

        I got 735 on my second go !

        -=# Welcome to Perl Lazy Skateboarding #=-
        by Sigmund 
        
        You got:
        a Powell Street Deck
        Small Hard Wheels
        and Regular Trucks
        and you decided to go Randomly Freestyling
        Great Nineties ! Smart Guy !
        Hey, good Boneless
        Hey, good Kickflip
        Hey, good Streetplant
        Hey, good Grind
        Hey, good Grind
        Hey, good Streetplant
        Hey, good Kickflip
        Hey, good Grind
        Hey, good Streetplant
        Hey, good Ollie
        Hey, good Ollie
        Hey, good Boneless
        Hey, good Wheelie
        Hey, good Boneless
        Hey, good Wheelie
        Hey, good Streetplant
        Hey, good Grind
        Hey, good Grind
        Hey, good Wheelie
        Hey, good Kickflip
        Hey, good Wheelie
        You Crashed!
        Today's Score is: 735
        
        You Made a High Score!
        

        Cool game ++, brings back all those great memories.

        Orthanc

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://117304]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-09-14 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.