Class: SnakeGame::SnakePart

Inherits:
GameObject show all
Defined in:
lib/snake_part.rb

Overview

Class representing a single part of snake

Instance Attribute Summary

Attributes inherited from GameObject

#image, #position

Instance Method Summary collapse

Methods inherited from GameObject

#draw

Constructor Details

#initialize(position, image) ⇒ SnakePart

attr_accessor :position, :image



9
10
11
12
13
# File 'lib/snake_part.rb', line 9

def initialize(position, image)
  # @position = position
  # @image = image
  super position, image
end