X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2Fdart-soundonly.pl;fp=dart%2Fdart-soundonly.pl;h=83c2d859fdac90320e10bbde041ed7696ecd45f2;hb=4e1578fe2dccf967d08b64207aed239752f8f929;hp=0000000000000000000000000000000000000000;hpb=df807f40fac0d0a1a582fc6cf1c01de838c16d84;p=svn42.git diff --git a/dart/dart-soundonly.pl b/dart/dart-soundonly.pl new file mode 100755 index 0000000..83c2d85 --- /dev/null +++ b/dart/dart-soundonly.pl @@ -0,0 +1,34 @@ +#!/usr/bin/perl -T -w +use strict; +$ENV{PATH}=''; +$| = 1; +&main(); +exit 0; + +sub main +{ + while (my $schuss = ) + { + chomp $schuss; + + my ($mult,$zahl)=split /\s+/,$schuss or next; + + if ($mult==2) + { + print "double\n"; + } elsif ($mult==3) { + print "triple\n"; + } elsif ($mult eq "btn") { + print "player\n"; + next; + } + ($zahl) = $zahl =~ m/(\d+)/; + if ($zahl >0 && $zahl < 21) + { + print $zahl . "\n"; + } else { + print "bull\n"; + } + } +} +