Class: RubyGo::Move

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(played) ⇒ Move

Returns a new instance of Move.



54
55
56
57
# File 'lib/ruby-go/moves.rb', line 54

def initialize(played)
  @played = played
  @captures = []
end

Instance Attribute Details

#capturesObject (readonly)

Returns the value of attribute captures.



52
53
54
# File 'lib/ruby-go/moves.rb', line 52

def captures
  @captures
end

#playedObject (readonly)

Returns the value of attribute played.



52
53
54
# File 'lib/ruby-go/moves.rb', line 52

def played
  @played
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/ruby-go/moves.rb', line 59

def empty?
  played.empty?
end