diff options
author | doy <doy@tozt.net> | 2009-04-24 23:53:53 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-24 23:53:53 -0500 |
commit | 82ce96adf83a63ee8b38cb6d711097ce379ee320 (patch) | |
tree | d9c51cd8e3a5349ea79536816bd89bdf4e14cc80 | |
parent | 362d635f2c565ab45ed570e16c6cae14c6c37704 (diff) | |
download | bot-games-82ce96adf83a63ee8b38cb6d711097ce379ee320.tar.gz bot-games-82ce96adf83a63ee8b38cb6d711097ce379ee320.zip |
don't allow players to be added if there is currently a challenger
-rw-r--r-- | lib/Bot/Games/Game/Ghost.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/Ghost.pm b/lib/Bot/Games/Game/Ghost.pm index 480def0..740ecd2 100644 --- a/lib/Bot/Games/Game/Ghost.pm +++ b/lib/Bot/Games/Game/Ghost.pm @@ -52,7 +52,7 @@ augment turn => sub { my $self = shift; my ($player, $state) = @_; - if (!grep { $player eq $_ } $self->players) { + if (!$self->has_challenger && !grep { $player eq $_ } $self->players) { if ($self->add_player($player)) { $self->current_player($player); } |