Class: Liberty

Inherits:
Stone show all
Defined in:
lib/stone.rb

Instance Attribute Summary

Attributes inherited from Stone

#color

Instance Method Summary collapse

Methods inherited from Stone

#==, #empty?, #group, #place_on_board, #remove_from_board, #to_coord, #to_s, #to_sgf, #to_str

Constructor Details

#initialize(x, y) ⇒ Liberty

Returns a new instance of Liberty.



66
67
68
69
# File 'lib/stone.rb', line 66

def initialize(x, y)
  super
  @color = :empty
end

Instance Method Details

#liberties(board) ⇒ Object



71
72
73
# File 'lib/stone.rb', line 71

def liberties(board)
  [self]
end