From c91d953548557f7c82396498ea8d33821afba5ed Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 22 Dec 2010 16:00:16 +0000 Subject: center in color runs --- lib/GridFiller/Status.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/GridFiller/Status.pm') 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); } } -- cgit v1.2.3