Class: Table
- Inherits:
-
Object
- Object
- Table
- Defined in:
- lib/r3d3/models/table.rb
Instance Method Summary collapse
- #forbid_move?(x, y) ⇒ Boolean
-
#initialize(dimension = 5) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(dimension = 5) ⇒ Table
Returns a new instance of Table.
3 4 5 |
# File 'lib/r3d3/models/table.rb', line 3 def initialize(dimension = 5) @dimension = dimension end |
Instance Method Details
#forbid_move?(x, y) ⇒ Boolean
7 8 9 |
# File 'lib/r3d3/models/table.rb', line 7 def forbid_move?(x, y) coordinate_out_of_range?(x) || coordinate_out_of_range?(y) end |