work ffs
parent
878eed7df7
commit
e9d3036c73
|
@ -5,21 +5,21 @@ use DDG::Goodie;
|
|||
triggers start => 'flip', 'coin';
|
||||
|
||||
handle remainder => sub {
|
||||
return unless my ($a, $n) = $_ =~ /^(flip a coin|flip (/d{0,2) coins?)$/;
|
||||
return unless my ($a, $n) = $_ =~ /^(flip a coin|flip (\d{0,2}) coins?)$/;
|
||||
my @output;
|
||||
my @ht = ('heads', 'tails');
|
||||
my $flips = 1;
|
||||
my $option = 2;
|
||||
my $flip;
|
||||
|
||||
if($a = "flip a coin" || "heads or tails") {
|
||||
if($a == "flip a coin" || "heads or tails") {
|
||||
$n = 1;
|
||||
}
|
||||
|
||||
if($n >= 1) {
|
||||
|
||||
for (1 .. $flips) {
|
||||
$flip = int(rand(@choices));
|
||||
for (1 .. $n) {
|
||||
$flip = int(rand(@ht));
|
||||
#$flip = $a[int rand($#a)];
|
||||
push @output, $flip;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue