Permalink
Browse files

Calculate width and height.

  • Loading branch information...
jtpalmer committed Aug 20, 2010
1 parent c3679b9 commit 50740241d45199c4f912f15a1e58c51036938f69
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Games/Maze/SDL.pm
View
@@ -14,14 +14,14 @@ use Path::Class;
sub run {
my ( $self, %options ) = @_;
- my $width = 640;
- my $height = 480;
+ my $cells_x = 16;
+ my $cells_y = 12;
my $cell_width = 40;
my $cell_height = 40;
+ my $width = $cell_width * $cells_x;
+ my $height = $cell_height * $cells_y;
my $player_width = 24;
my $player_height = 24;
- my $cells_x = 16;
- my $cells_y = 12;
my $dt = 25;
my $maze_model = Games::Maze::SDL::Model::Maze->new(

0 comments on commit 5074024

Please sign in to comment.