#!/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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: bPerl Lazy Skateboarding/b
by modabasi (Novice) on Oct 07, 2001 at 23:02 UTC | |
by kwoff (Friar) on Oct 08, 2001 at 05:24 UTC | |
by orthanc (Monk) on Oct 08, 2001 at 15:31 UTC |