diff options
Diffstat (limited to 'lib/Bot/Games/Game/Chess.pm')
-rw-r--r-- | lib/Bot/Games/Game/Chess.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/Chess.pm b/lib/Bot/Games/Game/Chess.pm index 25f550e..2f0adef 100644 --- a/lib/Bot/Games/Game/Chess.pm +++ b/lib/Bot/Games/Game/Chess.pm @@ -65,6 +65,16 @@ command resign => sub { nick => $args->{player}) }; +command state => sub { + my $self = shift; + my ($dummy, $args) = @_; + return $self->current_player + . ($self->game->to_move ? ' (white)' : ' (black)') + . ' to play: ' + . App::Nopaste::nopaste(text => $self->game->dump_pos, + nick => $args->{player}); +}; + sub format_turn { my $self = shift; my ($turn) = @_; |