rendered paste body#!/usr/bin/perl -w
#slots
if(@ARGV !=1) {
print "Usage: perl $0 <amount>\n";
exit;}
($amount) = @ARGV;
sub one {return int(rand(3) + 1);}
$result=one();
sub two {return int(rand(3) + 1);}
$two=two();
sub three {return int(rand(3) + 1);}
$three=three();
if ($result) {
if (($result == $two) && ($result == $three))
{
if ($result == 1) {print "[ $result ][ $two ][ $three ]\tYour money x2 ->", 2*$amount, "\n"}
elsif ($result == 2) {
print "[ $result ][ $two ][ $three ]\tYour money x5 ->", 5*$amount, "\n"}
elsif ($result == 3) {print "[ $result ][ $two ][ $three ]\tYour money x20 ->", 20*$amount, "\n"}
}
else { print "[ $result ][ $two ][ $three ]\n" }
}