Class: Tundengine::Player::InMatch
- Inherits:
-
Object
- Object
- Tundengine::Player::InMatch
- Includes:
- AlgebraicDataType
- Defined in:
- lib/tundengine/player/in_match.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
Instance Method Summary collapse
- #identifier ⇒ Object
- #in_new_round ⇒ Object
-
#initialize(name, strategy) ⇒ InMatch
constructor
A new instance of InMatch.
- #to_s ⇒ Object
Methods included from AlgebraicDataType
Constructor Details
#initialize(name, strategy) ⇒ InMatch
Returns a new instance of InMatch.
9 10 11 12 13 |
# File 'lib/tundengine/player/in_match.rb', line 9 def initialize(name, strategy) @name = name @strategy = strategy @match_points = 0 end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/tundengine/player/in_match.rb', line 7 def name @name end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
7 8 9 |
# File 'lib/tundengine/player/in_match.rb', line 7 def strategy @strategy end |
Instance Method Details
#identifier ⇒ Object
19 20 21 |
# File 'lib/tundengine/player/in_match.rb', line 19 def identifier [@name] end |
#in_new_round ⇒ Object
23 24 25 |
# File 'lib/tundengine/player/in_match.rb', line 23 def in_new_round InRound.new(self) end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/tundengine/player/in_match.rb', line 15 def to_s @name end |