diff options
Diffstat (limited to 'lib/Bot/Games/Game/Xghost.pm')
-rw-r--r-- | lib/Bot/Games/Game/Xghost.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/Xghost.pm b/lib/Bot/Games/Game/Xghost.pm index 20dc19a..fcdc9a3 100644 --- a/lib/Bot/Games/Game/Xghost.pm +++ b/lib/Bot/Games/Game/Xghost.pm @@ -15,6 +15,12 @@ command valid_move => sub { && length($self->state) + 1 == length($move); }; +command valid_word_from_state => sub { + my $self = shift; + my ($word) = @_; + return is_substring($self->state, uc($move)); +}; + __PACKAGE__->meta->make_immutable; no Bot::Games::OO; |