bugfix cricket wincondition
authorrealraum <realraum@realraum.at>
Wed, 6 Jul 2011 19:21:57 +0000 (19:21 +0000)
committerrealraum <realraum@realraum.at>
Wed, 6 Jul 2011 19:21:57 +0000 (19:21 +0000)
dart/dart-cricket.pl

index c319999..f96b0b9 100755 (executable)
@@ -51,6 +51,7 @@ sub win_condition
   my $score = $self->get_current_player()->{score}->{0};
   for my $player_idx (0..($self->{player_count}-1))
   {
+    next if not $self->get_player($player_idx)->{active};
     return if $score > $self->get_player($player_idx)->{score}->{0};
   }
   return 1;