return $self->callback('next_round');
}
+sub win
+{
+ my $self=shift;
+ $self->deactivate_current_player($self->{player_count}-$self->{active_player_count}+1);
+ $self->shout('win');
+ if ($self->{active_player_count}==1)
+ {
+ $self->next_player();
+ $self->lose();
+ } elsif (not $self->{active_player_count}) {
+ $self->end_game();
+ }
+}
+
+sub lose
+{
+ my $self=shift;
+ $self->deactivate_current_player($self->{active_player_count});
+ $self->shout('lose');
+ if ($self->{active_player_count}==1)
+ {
+ $self->next_player();
+ $self->win();
+ } elsif (not $self->{active_player_count}) {
+ $self->end_game();
+ }
+}
+
sub deactivate_current_player
{
my $self=shift;
sub end_game
{
my $self=shift;
+ $self->shout('end_game');
return $self->callback('end_game');
}