diff options
author | doy <doy@tozt.net> | 2009-04-25 12:29:47 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-25 12:29:47 -0500 |
commit | fd70eb77e3d8ef6f907eccdf0d9735a4280eef75 (patch) | |
tree | 35c5e21ae90b9566b5f592b54fc2c4cab40d4c9c /lib/Bot/Games/Game/Xghost.pm | |
parent | 82ce96adf83a63ee8b38cb6d711097ce379ee320 (diff) | |
download | bot-games-fd70eb77e3d8ef6f907eccdf0d9735a4280eef75.tar.gz bot-games-fd70eb77e3d8ef6f907eccdf0d9735a4280eef75.zip |
fix up a bunch of challenging issues in the ghost games
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; |