Class: Contest::RoundHistory

Inherits:
Object
  • Object
show all
Defined in:
docs/6_Contest_03_Contest_Creature.rb

Overview

Class storing all information about a round a creature played

Constant Summary collapse

APPEAL_HEART_VALUE =

Value of one heart in score points

Returns:

  • (Integer)
20

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(move, score, primary_judging: false, combo_executed: false) ⇒ RoundHistory

Create a new RoundHistory

Parameters:

  • move (Contest::Move, nil) —

    the move used during the round, nil if the turn was skipped or during the primary judging phase

  • score (Integer) —

    the score obtained during the round

  • combo_executed (Boolean) (defaults to: false) —

    Was a combo executed during the round?



104
105
# File 'docs/6_Contest_03_Contest_Creature.rb', line 104

def initialize(move, score, primary_judging: false, combo_executed: false)
end

Instance Attribute Details

#combo_executed ⇒ Boolean (readonly)

Was a combo executed during the round?

Returns:

  • (Boolean)


96
97
98
# File 'docs/6_Contest_03_Contest_Creature.rb', line 96

def combo_executed
  @combo_executed
end

#move ⇒ Contest::Move (readonly)

The Move used during the round

Returns:



87
88
89
# File 'docs/6_Contest_03_Contest_Creature.rb', line 87

def move
  @move
end

#real_score ⇒ Integer

Real score, used in total score counting.

Returns:

  • (Integer)


93
94
95
# File 'docs/6_Contest_03_Contest_Creature.rb', line 93

def real_score
  @real_score
end

#score ⇒ Integer

The score obtained during the round

Returns:

  • (Integer)


90
91
92
# File 'docs/6_Contest_03_Contest_Creature.rb', line 90

def score
  @score
end

Instance Method Details

#modify_score(score)

Modify the score of the round

Parameters:

  • score (Integer) —

    the score to add to the round's score



112
113
# File 'docs/6_Contest_03_Contest_Creature.rb', line 112

def modify_score(score)
end

#move_condition ⇒ Symbol

Get the condition of the move used during the round

Returns:

  • (Symbol) —

    the condition of the move



108
109
# File 'docs/6_Contest_03_Contest_Creature.rb', line 108

def move_condition
end