Class: Table

Inherits:
Object
  • Object
show all
Defined in:
lib/r3d3/models/table.rb

Instance Method Summary collapse

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

Returns:

  • (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