Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

It depends on chance

by cristian (Hermit)
on May 05, 2005 at 21:57 UTC ( #454520=obfuscated: print w/replies, xml ) Need Help??

Good Luck!!!!
#!/usr/bin/perl @w=("JUST","ANOTHER","PERL", "HACKER","MACHINE","ONLY","WIN","JOCKER" ,"COMMUNITY","THE","JAPH","YOU" , "|*|","."."_"x7 .".","|"."*"x7 ."|" ,"|"."_"x7 ."|");@x=( [$w[13],"| \\_ |","| | \\_ |","| \\_(_)|", "| (_) |",$w[15]], [$w[13] ,"| | |","| / \\ |", "| /___\\ |", "| O |",$w[15]], [$w[13] ,"| ___ |","| |_ | |", "| / / |" ,"| /_/ |" , $w[15] ] , [$w[13],$w[14] ,"|*$w[0]**|",$w[14],$w[14] ,$w[15]], [$w[13],$w[14] , "|$w[1]|",$w[14],$w[14],$w[15]],[$w[13] ,$w[14],"|*$w[2]**|",$w[14], $w[14],$w[15]],[$w[13],$w[14],"|$w[3]*|" ,$w[14],$w[14],$w[15]]) ; @p =(" __","(__)"," ||" ," ||"," ||"," ||", " ||"," ||","_//","_/");@d=(" |**|"."_"x34 ."|**|\n"," | /"."_"x34 . "\\ |\n"," | | $w[10] $w[4] $w[5] $w[10] $w[6] | |\n"," | ". " \\"."_"x30 ."/ |\n","("."_"x42 .")\n") ; @e=(" "."_"x40 ." \n" ," |****$w[0] $w[1] $w[2] $w[3] $w[7]*****|\n"," |"."_"x35 ."[]|$w[12 ]\n"," $w[12]|"."|_*_"x8 ."|*|$w[12]\n"," |*++"."_"x34 ."++*|\n");for $t(0 .. 3){push@{$z[$t]} ,@{$x[int(rand(7))]}for 0 .. 2;}my$n=@z-1;my $match=0;my$c=0;while(1){print"\ec";my$n=@{$z[0]}-1;my$i=0;if($c==($n +7)){for$__(0..3){shift@{$z[$__]}for 0..5}push@{$z[$_]},@{$x[int(rand (7))]}for 0..3;$c=0}$c++;print for@e;my $j=0;for(0..$n){$r[$_]= shift @{$z[$_]} for 0..3;push @{$z[$_]},$r[$_] for 0..3 ; print " $w[12]" . "$r[0]$r[1]$r[2]$r[3]$w[12]$p[$j]\n" ; $tmp ="$r[0]$r[1]$r[2]$r[3]" ; $match=1 if($tmp=~/$w[0]/ && $tmp=~/$w[1]/) && ($tmp=~/$w[3]/ && $tmp =~/$w[3]/);$i++;$j++;last if$i==$n;}print for@d;last if $match;usleep (70000) ; }@m=(" $w[12] "."*"x30 ." $w[12]"," $w[12] *"." "x7 . "$w[0] $w[4]"." "x9 ."* $w[12]" , " $w[12] "."*"x30 ." $w[12]" ," $w[12] * $w[0] $w[1] $w[2] $w[3] * $w[12]"," $w[12] *" . " "x10 . "$w[10] $w[6]"." "x10 ."* $w[12]" , " $w[12] *"." "x10 . "$w[11] $w[6]"." "x11 ."* $w[12]"," $w[12] * $w[9] $w[2] $w[8]". " $w[6] * $w[12]"," $w[12] "."*"x30 ." $w[12]"," $w[12]"." " x36 .$w[12]," $w[12]"." "x36 .$w[12]);print "\ec";print for @e; print " "."$w[12]"." "x36 ."$w[12]"."\ttry again=>perl $0\n";print" $w[12]" ." "x36 ."$w[12]\n";for my$j(0 ..@m-1){my@a=split // ,"$m[$j]$p[$j]"; print"$_"for@a;print"\n"}print" $w[12]$x[3][$_]"."$x[4][$_]$x[5][$_]" ."$x[6][$_]$w[12]\n" for 0..5 ; print for @d;use Time::HiRes(usleep);

Replies are listed 'Best First'.
Re: It depends on chance
by K_M_McMahon (Hermit) on May 06, 2005 at 04:05 UTC
    Awesome concept and implementation. I'm curious as to how long it took just for the ASCII portion getting it all to line up?

    -Kevin
    my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}
Re: It depends on chance
by CountZero (Bishop) on May 06, 2005 at 18:52 UTC
    Awesome!

    End of the month I'm going to Las Vegas, be sure I will be on the look-out to play on this machine.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: It depends on chance
by theroninwins (Friar) on May 10, 2005 at 09:26 UTC
    Awesome "script". Haven't seen something this good for a long time. Looking forward for you next one
Re: It depends on chance
by Anonymous Monk on May 11, 2005 at 03:42 UTC
    w00t!  What do i win?!?!?!
    
      ________________________________________ 
     |****JUST ANOTHER PERL HACKER JOCKER*****|
     |___________________________________[]||*|
     |*|||_*_|_*_|_*_|_*_|_*_|_*_|_*_|_*_|*||*|
     |*++__________________________________++*|
     |*||_______||_______||_______||_______||*| __
     |*|._______.._______.._______.._______.|*|(__)
     |*||   |   || \_    ||   |   ||*******||*| ||
     |*||  / \  || | \_  ||  / \  ||*PERL**||*| ||
     |*|| /___\ ||  \_(_)|| /___\ ||*******||*| ||
     |*||   O   ||  (_)  ||   O   ||*******||*| ||
     |*||_______||_______||_______||_______||*| ||
     |*|._______.._______.._______.._______.|*| ||
     |*||*******||*******||*******||*******||*|_//
     |*||*PERL**||*PERL**||*PERL**||*PERL**||*|_/
     |*||*******||*******||*******||*******||*|
     |*||*******||*******||*******||*******||*|
     |*||_______||_______||_______||_______||*|
     |*|._______.._______.._______.._______.|*|
     |*|| \_    ||*******|| \_    ||*******||*|
     |*|| | \_  ||HACKER*|| | \_  ||*PERL**||*|
     |*||  \_(_)||*******||  \_(_)||*******||*|
     |**|__________________________________|**|
     |  /__________________________________\  |
     |   |  JAPH MACHINE ONLY JAPH WIN    |  |
     |    \______________________________/    |
    (__________________________________________)
    
    
Re: It depends on chance
by jdalbec (Deacon) on May 11, 2005 at 02:27 UTC
    There appears to be a typo on the $match=1 line. Should the 3 in that line be a 2?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://454520]
Approved by K_M_McMahon
Front-paged by K_M_McMahon
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-05-24 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?