From 731ab5a24a4526feb63a86be0b63f098641bb676 Mon Sep 17 00:00:00 2001 From: doy Date: Thu, 18 Dec 2008 04:34:39 -0500 Subject: compare state with moves properly (state will always be uppercase) --- lib/Bot/Games/Game/Xghost.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Bot/Games/Game/Xghost.pm') 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); } -- cgit v1.2.3-54-g00ecf