Permalink
Browse files

Style changes

  • Loading branch information...
jtpalmer committed May 20, 2012
1 parent 7527898 commit 82e104fa354cf6719ccff5d6e79438079c9f613e
Showing with 7 additions and 10 deletions.
  1. +7 −10 bin/sokoban.pl
View
@@ -1,7 +1,6 @@
#!/usr/bin/perl
use strict;
use warnings;
-
use SDL;
use SDL::Event;
use SDL::Rect;
@@ -97,38 +96,35 @@ sub init_player {
sub init_wall {
my ( $x, $y ) = @_;
- push @WALLS,
- {
+ push @WALLS => {
x => $x,
y => $y,
sprite => SDLx::Sprite->new(
surface => $SURFACES{wall},
x => $x * $SIZE,
y => $y * $SIZE,
),
- };
+ };
}
sub init_box {
my ( $x, $y ) = @_;
- push @BOXES,
- {
+ push @BOXES => {
x => $x,
y => $y,
sprite => SDLx::Sprite->new(
surface => $SURFACES{box},
x => $x * $SIZE,
y => $y * $SIZE,
),
- };
+ };
}
sub init_goal {
my ( $x, $y ) = @_;
- push @GOALS,
- {
+ push @GOALS => {
x => $x,
y => $y,
sprite => SDLx::Sprite::Animated->new(
@@ -137,7 +133,7 @@ sub init_goal {
ticks_per_frame => 10,
type => 'reverse',
)->start(),
- };
+ };
}
sub move_player {
@@ -269,3 +265,4 @@ sub handle_show {
$APP->add_show_handler( \&handle_show );
init_level( Games::Sokoban->new_from_file( $SHARE->file('level1.sok') ) );
$APP->run();
+

0 comments on commit 82e104f

Please sign in to comment.