Class: RubyGo::Liberty
Instance Attribute Summary
Attributes inherited from Stone
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Liberty
constructor
A new instance of Liberty.
- #liberties(board) ⇒ Object
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.
67 68 69 70 |
# File 'lib/ruby-go/stone.rb', line 67 def initialize(x, y) super @color = :empty end |
Instance Method Details
#liberties(board) ⇒ Object
72 73 74 |
# File 'lib/ruby-go/stone.rb', line 72 def liberties(board) [self] end |