Class: Binary_Puzzle_Solver::CellHandle

Inherits:
Object
  • Object
show all
Defined in:
lib/binary_puzzle_solver/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row_handle, x) ⇒ CellHandle



928
929
930
931
932
933
# File 'lib/binary_puzzle_solver/base.rb', line 928

def initialize (row_handle, x)
    @row_handle = row_handle
    @x = x

    return
end

Instance Attribute Details

#row_handleObject (readonly)

Returns the value of attribute row_handle.



926
927
928
# File 'lib/binary_puzzle_solver/base.rb', line 926

def row_handle
  @row_handle
end

#xObject (readonly)

Returns the value of attribute x.



926
927
928
# File 'lib/binary_puzzle_solver/base.rb', line 926

def x
  @x
end

Instance Method Details

#get_cellObject



943
944
945
# File 'lib/binary_puzzle_solver/base.rb', line 943

def get_cell()
    return row_handle.get_cell(x)
end

#get_charObject



947
948
949
# File 'lib/binary_puzzle_solver/base.rb', line 947

def get_char()
    return get_cell().get_char()
end

#get_coordObject



935
936
937
# File 'lib/binary_puzzle_solver/base.rb', line 935

def get_coord()
    return row_handle.get_coord(x)
end

#get_stateObject



939
940
941
# File 'lib/binary_puzzle_solver/base.rb', line 939

def get_state()
    return row_handle.get_state(x)
end