Class: CombatRound

Inherits:
Object
  • Object
show all
Defined in:
lib/middle_earth_challenge_simulator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attack1Object (readonly)

Returns the value of attribute attack1.



69
70
71
# File 'lib/middle_earth_challenge_simulator.rb', line 69

def attack1
  @attack1
end

#attack2Object (readonly)

Returns the value of attribute attack2.



69
70
71
# File 'lib/middle_earth_challenge_simulator.rb', line 69

def attack2
  @attack2
end

#character1Object (readonly)

Returns the value of attribute character1.



69
70
71
# File 'lib/middle_earth_challenge_simulator.rb', line 69

def character1
  @character1
end

#character2Object (readonly)

Returns the value of attribute character2.



69
70
71
# File 'lib/middle_earth_challenge_simulator.rb', line 69

def character2
  @character2
end

#damageObject (readonly)

Returns the value of attribute damage.



69
70
71
# File 'lib/middle_earth_challenge_simulator.rb', line 69

def damage
  @damage
end