X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2Fdart-cricket.pl;h=91431d9ddd7eb192d7a8622f72723032dedc3744;hb=adc899317657443237e27bcf81fec5ba6f220f80;hp=de18e0ef1097f896df899809d8baf90fec2559f0;hpb=3311c2a78c87d6428b8aeca2b14e8d86f49505fd;p=svn42.git diff --git a/dart/dart-cricket.pl b/dart/dart-cricket.pl index de18e0e..91431d9 100755 --- a/dart/dart-cricket.pl +++ b/dart/dart-cricket.pl @@ -12,6 +12,7 @@ my $dart = new Dart(player_names=>\@player, callbacks => { shoot=>\&shoot, next_player=>\&next_player, + before_shoot=>\&print_score, } ); exit $dart->run(); @@ -71,13 +72,11 @@ sub shoot $self->shout_last_shoot() if ($scored || $self_scored); $self->shout("scored") if $scored; $self->shout("scho") if $scho && not $scored; - &print_score($self); } sub next_player { my $self=shift; - &print_score($self); } sub print_score