summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-22 15:08:06 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-22 15:08:06 -0400
commit0e62856af011453230064996da07202e7028b09e (patch)
tree8dfc14a57d931885a9eedfccd4b3f12a40e00532
parentb8ed4cb07364c8fab38483f01ab611a8dc4b037e (diff)
downloadBot-Zulip-Chess-0e62856af011453230064996da07202e7028b09e.tar.gz
Bot-Zulip-Chess-0e62856af011453230064996da07202e7028b09e.zip
add some debugging
-rw-r--r--lib/Bot/Zulip/Chess.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Bot/Zulip/Chess.pm b/lib/Bot/Zulip/Chess.pm
index 05ae0eb..93a070a 100644
--- a/lib/Bot/Zulip/Chess.pm
+++ b/lib/Bot/Zulip/Chess.pm
@@ -148,9 +148,11 @@ sub needs_new_player ($self) {
sub set_new_player ($self, $player) {
if (!$self->has_white_player) {
+ warn "$player is now playing White";
$self->white_player($player)
}
elsif (!$self->has_black_player) {
+ warn "$player is now playing Black";
$self->black_player($player);
}
else {
@@ -160,6 +162,7 @@ sub set_new_player ($self, $player) {
sub increment_turn ($self) {
$self->turn($self->turn eq 'white' ? 'black' : 'white');
+ warn "It is now " . $self->turn . "'s turn";
}
sub draw_state ($self) {