summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/Game/Chess.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bot/Games/Game/Chess.pm')
-rw-r--r--lib/Bot/Games/Game/Chess.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/Chess.pm b/lib/Bot/Games/Game/Chess.pm
index abd94fd..a899a4c 100644
--- a/lib/Bot/Games/Game/Chess.pm
+++ b/lib/Bot/Games/Game/Chess.pm
@@ -33,7 +33,7 @@ augment turn => sub {
unless $self->has_player($player);
my $player_index = $self->game->to_move ? 0 : 1;
return "It's not your turn"
- if $player ne $self->players->[$player_index];
+ if $player ne ($self->players->[$player_index] || '');
my $status = eval { $self->game->go_move($move) };
return $@ if $@;