Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Iron Perl Monks, Part 1

by halxd2 (Monk)
on Jan 04, 2001 at 03:25 UTC ( #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!");


Comment on Re: Iron Perl Monks, Part 1
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-07-25 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls