Class: Pacman::Cage

Inherits:
Object
  • Object
show all
Defined in:
lib/pacman/cage.rb

Overview

base point for ghosts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Cage

Returns a new instance of Cage.



4
5
6
# File 'lib/pacman/cage.rb', line 4

def initialize(x, y)
  @x, @y = x, y
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



12
13
14
# File 'lib/pacman/cage.rb', line 12

def x
  @x
end

#yObject

Returns the value of attribute y.



12
13
14
# File 'lib/pacman/cage.rb', line 12

def y
  @y
end

Instance Method Details

#passable?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/pacman/cage.rb', line 8

def passable?
  true
end