Class: RubyGo::Move
- Inherits:
-
Object
- Object
- RubyGo::Move
- Defined in:
- lib/ruby-go/moves.rb
Instance Attribute Summary collapse
-
#captures ⇒ Object
readonly
Returns the value of attribute captures.
-
#played ⇒ Object
readonly
Returns the value of attribute played.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(played) ⇒ Move
constructor
A new instance of Move.
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
#captures ⇒ Object (readonly)
Returns the value of attribute captures.
52 53 54 |
# File 'lib/ruby-go/moves.rb', line 52 def captures @captures end |
#played ⇒ Object (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
59 60 61 |
# File 'lib/ruby-go/moves.rb', line 59 def empty? played.empty? end |