diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-11-02 18:50:55 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-11-02 18:50:55 -0600 |
commit | a23fd63c8c66dff93bc77ec3cc66aba984480b5a (patch) | |
tree | 1225ff7a3acef01cce55d6d749fa78fc8d7d9366 | |
parent | e346fd1fd41d184393b0f14cf56eaf30821501bd (diff) | |
download | bot-games-a23fd63c8c66dff93bc77ec3cc66aba984480b5a.tar.gz bot-games-a23fd63c8c66dff93bc77ec3cc66aba984480b5a.zip |
fix broken valid_word_from_state for spook
-rw-r--r-- | lib/Bot/Games/Game/Spook.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Bot/Games/Game/Spook.pm b/lib/Bot/Games/Game/Spook.pm index 7cecca0..4b47947 100644 --- a/lib/Bot/Games/Game/Spook.pm +++ b/lib/Bot/Games/Game/Spook.pm @@ -17,9 +17,7 @@ command valid_move => sub { command valid_word_from_state => sub { my $self = shift; my ($word) = @_; - $word = uc join '', sort split(//, $word); - my $state = join '', sort split(//, $self->state); - return $word eq $state; + return is_subpermutation($self->state, uc($word)); }, formatter => 'Bool'; __PACKAGE__->meta->make_immutable; |