Class: Statistic::StatisticRow

Inherits:
Object
  • Object
show all
Defined in:
lib/codebreaker/statistic/statistic_row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(player:, difficult_init:) ⇒ StatisticRow

Returns a new instance of StatisticRow.



7
8
9
10
11
12
13
14
15
# File 'lib/codebreaker/statistic/statistic_row.rb', line 7

def initialize(player:, difficult_init:)
  @rating = nil
  @player_name = player.name
  @difficult_name = difficult_init.name
  @init_attempts_count = difficult_init.attempts_count
  @init_hints_count = difficult_init.hint.hints_count
  @used_attempts_count = 0
  @used_hints_count = 0
end

Instance Attribute Details

#difficult_nameObject

Returns the value of attribute difficult_name.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def difficult_name
  @difficult_name
end

#init_attempts_countObject

Returns the value of attribute init_attempts_count.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def init_attempts_count
  @init_attempts_count
end

#init_hints_countObject

Returns the value of attribute init_hints_count.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def init_hints_count
  @init_hints_count
end

#player_nameObject

Returns the value of attribute player_name.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def player_name
  @player_name
end

#ratingObject

Returns the value of attribute rating.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def rating
  @rating
end

#used_attempts_countObject

Returns the value of attribute used_attempts_count.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def used_attempts_count
  @used_attempts_count
end

#used_hints_countObject

Returns the value of attribute used_hints_count.



3
4
5
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3

def used_hints_count
  @used_hints_count
end