summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Zulip/Chess.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bot/Zulip/Chess.pm')
-rw-r--r--lib/Bot/Zulip/Chess.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Bot/Zulip/Chess.pm b/lib/Bot/Zulip/Chess.pm
index 57a2f44..5501a45 100644
--- a/lib/Bot/Zulip/Chess.pm
+++ b/lib/Bot/Zulip/Chess.pm
@@ -207,10 +207,12 @@ sub draw_state ($self) {
if ($status->{mate}) {
$board .= "CHECKMATE\n";
$self->reset_board;
+ return $board;
}
elsif ($status->{stalemate}) {
$board .= "STALEMATE\n";
$self->reset_board;
+ return $board;
}
elsif ($status->{check}) {
$board .= "CHECK\n";