diff options
Diffstat (limited to 'lib/GridFiller/Status.pm')
-rw-r--r-- | lib/GridFiller/Status.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/GridFiller/Status.pm b/lib/GridFiller/Status.pm index 6e457b6..bf5e9e6 100644 --- a/lib/GridFiller/Status.pm +++ b/lib/GridFiller/Status.pm @@ -82,17 +82,17 @@ sub _build_grid_status { } sub place_word_at { - my ($self, $word, $x, $y, $dir) = @_; + my ($self, $word, $space, $x, $y, $dir) = @_; $self->log->debug("Marking <$word> occupied at ${x}:${y} ($dir)"); if ($dir == $HORIZONTAL) { - for my $i (0..$self->length->($word)-1) { + for my $i (0..$self->length->($word)+$space-1) { $self->_mark_occupied($x+$i,$y); } } elsif ($dir == $VERTICAL) { - for my $i (0..$self->length->($word)-1) { + for my $i (0..$self->length->($word)+$space-1) { $self->_mark_occupied($x,$y+$i); } } |