Class: Pacman::Cage
- Inherits:
-
Object
- Object
- Pacman::Cage
- Defined in:
- lib/pacman/cage.rb
Overview
base point for ghosts
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Cage
constructor
A new instance of Cage.
- #passable? ⇒ Boolean
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
#x ⇒ Object
Returns the value of attribute x.
12 13 14 |
# File 'lib/pacman/cage.rb', line 12 def x @x end |
#y ⇒ Object
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
8 9 10 |
# File 'lib/pacman/cage.rb', line 8 def passable? true end |