new dart features beliebiges cricket
authorrealraum <realraum@realraum.at>
Sat, 2 Jul 2011 20:47:52 +0000 (20:47 +0000)
committerrealraum <realraum@realraum.at>
Sat, 2 Jul 2011 20:47:52 +0000 (20:47 +0000)
dart/dart-dummy.pl [new file with mode: 0755]
dart/dart-fullcricket.pl

diff --git a/dart/dart-dummy.pl b/dart/dart-dummy.pl
new file mode 100755 (executable)
index 0000000..5743114
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/perl
+$|=1;
+while(<>)
+{
+  print
+}
index fc20658..92c6721 100755 (executable)
@@ -44,7 +44,7 @@ while ( my $schuss = <STDIN>)
       if ($score{$current_player}{$zahl}<3)
       {
         $score{$current_player}{$zahl}++;
-        $self_scored;
+        $self_scored++;
       } else {
         $scho++;
         for my $playernum (1..$numplayer)
@@ -57,9 +57,9 @@ while ( my $schuss = <STDIN>)
         }
       }
     }
-    print $schuss if ($scored || $scho || $self_scored);
+    print $schuss if ($scored || $self_scored);
     print "scored\n" if $scored;
-    print "scho\n" if $scho;
+    print "scho\n" if $scho && not $scored;
   } elsif ($mult eq 'btn') {
     print $schuss;
     $current_player++;