Skip to content

Commit

Permalink
Refactor starting points
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed Mar 27, 2011
1 parent 336b090 commit 91076dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions week4/lib/Games/ElectricLines.pm
Expand Up @@ -103,7 +103,7 @@ sub _build_starting_points {

my $app = $self->_app;
my $space = $app->h / $count;
my $x = 0;
my $x = $self->_sprite->rect->w / 2;

my @points;

Expand All @@ -118,7 +118,7 @@ sub _build_starting_points {
sub _build_horizontal_lines {
my ($self) = @_;

my $x = $self->_app->w;
my $x = $self->_app->w - $self->_sprite->rect->w / 2;

my @lines;
foreach my $point ( @{ $self->_starting_points } ) {
Expand Down Expand Up @@ -333,7 +333,7 @@ sub _add_plasma {
my $line = $self->_horizontal_lines->[$i];

my %plasma = (
x => $start[0] + $self->_sprite->rect->w / 2,
x => $start[0],
y => $start[1],
line => $line,
);
Expand Down

0 comments on commit 91076dd

Please sign in to comment.