Class: RubyGo::NullStone

Inherits:
Stone
  • Object
show all
Defined in:
lib/ruby-go/stone.rb

Instance Attribute Summary

Attributes inherited from Stone

#color

Instance Method Summary collapse

Methods inherited from Stone

#==, #empty?, #group, #liberties, #place_on_board, #to_coord, #to_s, #to_str

Constructor Details

#initialize(color = :empty) ⇒ NullStone

Returns a new instance of NullStone.



92
93
94
95
# File 'lib/ruby-go/stone.rb', line 92

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

Instance Method Details

#remove_from_board(board) ⇒ Object



97
98
# File 'lib/ruby-go/stone.rb', line 97

def remove_from_board(board)
end

#to_sgfObject



100
101
102
# File 'lib/ruby-go/stone.rb', line 100

def to_sgf
  ";#{color.to_s[0].upcase}[]"
end