{
my $self=shift;
my ($mul,$zahl)=@_;
- my @zahlen = qw/20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5/;
+ my @zahlen = qw/20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5 25/;
my $counter=0;
$counter++ while($zahl != shift @zahlen and @zahlen);
$mul=0 if $mul >1;
{
my $self=shift;
my ($mult,$zahl)=@_;
- my $color = $self->get_color($mult,$zahl)?1:-1;
- if ($self->get_current_player()->{score} >= $mult * $zahl)
+ my $color = $self->get_color($mult,$zahl)?1:-1;
+ if ($color <0)
{
- $self->get_current_player()->{score} -= $color *$mult * $zahl;
- $self->shout_last_shoot();
- $self->win() if &win_condition($self);
- }
- else
- {
- $self->shout("miss");
- $self->get_current_player()->{score} = $self->get_current_player()->{last_score};
- $self->finish_player_round();
+ $self->shout("plus");
+ }else{
+ $self->shout("minus");
}
+ $self->get_current_player()->{score} -= $color *$mult * $zahl;
+ $self->shout_last_shoot();
+ $self->win() if &win_condition($self);
}
sub next_player