Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Iron Perl Monks, Part 1

by halxd2 (Monk)
on Jan 04, 2001 at 03:25 UTC ( [id://49640]=note: print w/replies, xml ) Need Help??


in reply to Iron Perl Monks, Part 1

#!/usr/monastery/arena/bin/perl use strict; use Net::NutBits; use Net::Mammal; use Monks::IronMonk; use Contest; local $Chipmunk = new Mammal; local $Ovid = new IronMonk; local $Combat = new Contest($Chipmunk, $Ovid); while( $Combat->round-- && $Combat->Fighting()) { if ( $Ovid->karma() > $Chipmunk->karma() ) { $Chipmunk->pain++; }else { $Ovid->pain++; } if ( ! $Chipmunk->karma() ) { $Combat->Winner = $Ovid;} if ( ! $Ovid->karma() ) { $Combat->Winner = $Chipmunk;} } $Combat->Winner->Glory(); $Combat->loser("Rice-a-Roni!");

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found