Skip to content
Browse files

Tidy

  • Loading branch information...
1 parent 592d959 commit 3aaf93716fbd3fb99ae3d77b14d8badaad01aaed @jtpalmer committed Aug 21, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 examples/test.pl
View
22 examples/test.pl
@@ -11,15 +11,15 @@
my $fps = 30;
my $controller = SDLx::Controller::FPS->new(
- fps => $fps,
- eoq => 1,
+ fps => $fps,
+ eoq => 1,
);
my $rect = {
- x => 0,
- y => 0,
- w => 25,
- h => 25,
+ x => 0,
+ y => 0,
+ w => 25,
+ h => 25,
vx => 1,
vy => 1,
};
@@ -33,7 +33,7 @@
my $key = SDL::Events::get_key_name( $event->key_sym );
if ( $key =~ /^[123]$/ ) {
- $controller->fps($fps / $key);
+ $controller->fps( $fps / $key );
$controller->move_ratio($key);
}
}
@@ -45,19 +45,19 @@
$rect->{x} += $rect->{vx};
$rect->{y} += $rect->{vy};
- if ($rect->{vx} < 0 && $rect->{x} < 0) {
+ if ( $rect->{vx} < 0 && $rect->{x} < 0 ) {
$rect->{vx} *= -1;
}
- if ($rect->{vy} < 0 && $rect->{y} < 0) {
+ if ( $rect->{vy} < 0 && $rect->{y} < 0 ) {
$rect->{vy} *= -1;
}
- if ($rect->{vx} > 0 && $rect->{x} > $app->w - $rect->{w}) {
+ if ( $rect->{vx} > 0 && $rect->{x} > $app->w - $rect->{w} ) {
$rect->{vx} *= -1;
}
- if ($rect->{vy} > 0 && $rect->{y} > $app->h - $rect->{h}) {
+ if ( $rect->{vy} > 0 && $rect->{y} > $app->h - $rect->{h} ) {
$rect->{vy} *= -1;
}
}

0 comments on commit 3aaf937

Please sign in to comment.
Something went wrong with that request. Please try again.