Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Screen size constants.

  • Loading branch information...
commit 327f61726eb6481a052d94be965b31b29917a072 1 parent 79424ef
@dhotson dhotson authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 asc.rb
View
7 asc.rb
@@ -1,5 +1,8 @@
# encoding: utf-8
+SCREEN_WIDTH = 120
+SCREEN_HEIGHT = 40
+
class Game
def initialize
reset
@@ -7,8 +10,8 @@ def initialize
def reset
@run = true
background = Background.new
- @world = World.new(120, background)
- @screen = Screen.new(120, 40, @world, background)
+ @world = World.new(SCREEN_WIDTH, background)
+ @screen = Screen.new(SCREEN_WIDTH, SCREEN_HEIGHT, @world, background)
end
def run
Signal.trap(:INT) do
Please sign in to comment.
Something went wrong with that request. Please try again.