diff options
Diffstat (limited to 'lib/Bot/Games/Game/Chess.pm')
-rw-r--r-- | lib/Bot/Games/Game/Chess.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/Chess.pm b/lib/Bot/Games/Game/Chess.pm index ad4549c..f196a09 100644 --- a/lib/Bot/Games/Game/Chess.pm +++ b/lib/Bot/Games/Game/Chess.pm @@ -29,7 +29,8 @@ has turn_count => ( augment turn => sub { my $self = shift; my ($player, $move) = @_; - $self->add_player($player) unless $self->has_player($player); + $self->maybe_add_player($player); + return "The game has already begun between " . join ' and ', $self->players unless $self->has_player($player); return "It's not your turn" |