class SnakeGame::GameObject
Base class for all game objects
Attributes
image[RW]
position[RW]
Public Class Methods
new(position, image)
click to toggle source
# File lib/game_object.rb, line 8 def initialize(position, image) @position = position @image = image end
Public Instance Methods
draw()
click to toggle source
# File lib/game_object.rb, line 13 def draw @image.draw @position.x, @position.y, 0 end