Class: Tundengine::RoundAnalyzer
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Tundengine::RoundAnalyzer
- Defined in:
- lib/tundengine/round_analyzer.rb
Instance Method Summary collapse
Instance Method Details
#result ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tundengine/round_analyzer.rb', line 4 def result if last_declaration.has_tute_effect?(tute_value) losers_in_round_by_tute = players - last_winner_player losers_by_tute = in_match(losers_in_round_by_tute) losers_by_tute.each_with_object({}) do |k, h| h[k] = tute_value.points_for_loser(k, max_match_points) end else points_for_losers = 1 losers = in_match(losers_in_round) losers.each_with_object({}) do |k, h| h[k] = points_for_losers end end end |