diff options
author | doy <doy@tozt.net> | 2008-12-18 04:34:39 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2008-12-18 04:34:39 -0500 |
commit | 731ab5a24a4526feb63a86be0b63f098641bb676 (patch) | |
tree | 889595839d69f2c712ed1cad66a98e09186423a4 /lib/Bot/Games | |
parent | 2c7815054183d3b64d624c743ca622d812cc55dc (diff) | |
download | bot-games-731ab5a24a4526feb63a86be0b63f098641bb676.tar.gz bot-games-731ab5a24a4526feb63a86be0b63f098641bb676.zip |
compare state with moves properly (state will always be uppercase)
Diffstat (limited to 'lib/Bot/Games')
-rw-r--r-- | lib/Bot/Games/Game/Spook.pm | 2 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Xghost.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bot/Games/Game/Spook.pm b/lib/Bot/Games/Game/Spook.pm index 83b3890..bba3f41 100644 --- a/lib/Bot/Games/Game/Spook.pm +++ b/lib/Bot/Games/Game/Spook.pm @@ -11,7 +11,7 @@ has '+help' => ( sub valid_move { my $self = shift; my ($move) = @_; - return is_subpermutation($self->state, $move) + return is_subpermutation($self->state, uc($move)) && length($self->state) + 1 == length($move); } diff --git a/lib/Bot/Games/Game/Xghost.pm b/lib/Bot/Games/Game/Xghost.pm index 346ddf6..2dbf532 100644 --- a/lib/Bot/Games/Game/Xghost.pm +++ b/lib/Bot/Games/Game/Xghost.pm @@ -11,7 +11,7 @@ has '+help' => ( sub valid_move { my $self = shift; my ($move) = @_; - return is_substring($self->state, $move) + return is_substring($self->state, uc($move)) && length($self->state) + 1 == length($move); } |