diff options
Diffstat (limited to 'lib/Bot/Games/Game/24.pm')
-rw-r--r-- | lib/Bot/Games/Game/24.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm index fcfe24b..e461a96 100644 --- a/lib/Bot/Games/Game/24.pm +++ b/lib/Bot/Games/Game/24.pm @@ -32,6 +32,7 @@ sub turn { my ($player, $expr) = @_; $self->add_player($player) unless $self->has_player($player); + $expr =~ s/\s//g; my $numbers = join ',', sort grep { $_ } split(/[-\+\*\/\(\)]+/, $expr); my $solution = join ',', sort split(' ', $self->state); return "invalid numbers" unless $numbers eq $solution; |