Class: NullStone

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, #liberties, #place_on_board, #to_coord, #to_s, #to_str

Constructor Details

#initialize(color = :empty) ⇒ NullStone

Returns a new instance of NullStone.



91
92
93
94
# File 'lib/stone.rb', line 91

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

Instance Method Details

#remove_from_board(board) ⇒ Object



96
97
# File 'lib/stone.rb', line 96

def remove_from_board(board)
end

#to_sgfObject



99
100
101
# File 'lib/stone.rb', line 99

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