Class: RubyGo::NullStone

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

Overview

This can be changed to a Pass object

Constant Summary

Constants inherited from Stone

Stone::LETTERS

Instance Attribute Summary

Attributes inherited from Stone

#color, #x_coord, #y_coord

Instance Method Summary collapse

Methods inherited from Stone

#==, #to_coord

Constructor Details

#initialize(color = :empty) ⇒ NullStone

Returns a new instance of NullStone.



36
37
38
39
40
# File 'lib/ruby-go/stone.rb', line 36

def initialize(color = :empty)
  @x_coord = nil
  @y_coord = nil
  @color = color
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/ruby-go/stone.rb', line 46

def empty?
  true
end

#to_sgfObject



42
43
44
# File 'lib/ruby-go/stone.rb', line 42

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