Class: CombatRound
- Inherits:
-
Object
- Object
- CombatRound
- Defined in:
- lib/middle_earth_challenge_simulator.rb
Instance Attribute Summary collapse
-
#attack1 ⇒ Object
readonly
Returns the value of attribute attack1.
-
#attack2 ⇒ Object
readonly
Returns the value of attribute attack2.
-
#character1 ⇒ Object
readonly
Returns the value of attribute character1.
-
#character2 ⇒ Object
readonly
Returns the value of attribute character2.
-
#damage ⇒ Object
readonly
Returns the value of attribute damage.
Instance Method Summary collapse
-
#initialize(a1, a2, d, c1, c2) ⇒ CombatRound
constructor
A new instance of CombatRound.
Constructor Details
#initialize(a1, a2, d, c1, c2) ⇒ CombatRound
70 71 72 73 74 75 76 |
# File 'lib/middle_earth_challenge_simulator.rb', line 70 def initialize(a1, a2, d, c1, c2) @attack1 = a1 @attack2 = a2 @damage = d @character1 = c1.dup @character2 = c2.dup end |
Instance Attribute Details
#attack1 ⇒ Object (readonly)
Returns the value of attribute attack1.
69 70 71 |
# File 'lib/middle_earth_challenge_simulator.rb', line 69 def attack1 @attack1 end |
#attack2 ⇒ Object (readonly)
Returns the value of attribute attack2.
69 70 71 |
# File 'lib/middle_earth_challenge_simulator.rb', line 69 def attack2 @attack2 end |
#character1 ⇒ Object (readonly)
Returns the value of attribute character1.
69 70 71 |
# File 'lib/middle_earth_challenge_simulator.rb', line 69 def character1 @character1 end |
#character2 ⇒ Object (readonly)
Returns the value of attribute character2.
69 70 71 |
# File 'lib/middle_earth_challenge_simulator.rb', line 69 def character2 @character2 end |
#damage ⇒ Object (readonly)
Returns the value of attribute damage.
69 70 71 |
# File 'lib/middle_earth_challenge_simulator.rb', line 69 def damage @damage end |