1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-10 15:54:19 +00:00

Fixed double elimination advancement and match after update actions.

This commit is contained in:
2020-01-27 08:34:25 -05:00
parent 5bb4febd79
commit 870c5bc7ec
3 changed files with 40 additions and 36 deletions

View File

@@ -1,7 +1,8 @@
class AdvanceWrestler
def initialize( wrestler )
def initialize( wrestler, last_match )
@wrestler = wrestler
@tournament = @wrestler.tournament
@last_match = last_match
end
def advance
@@ -14,7 +15,7 @@ class AdvanceWrestler
def advance_raw
pool_to_bracket_advancement if @tournament.tournament_type == "Pool to bracket"
DoubleEliminationAdvance.new(@wrestler).bracket_advancement if @tournament.tournament_type == "Modified 16 Man Double Elimination" or
DoubleEliminationAdvance.new(@wrestler, @last_match).bracket_advancement if @tournament.tournament_type == "Modified 16 Man Double Elimination" or
@tournament.tournament_type == "Double Elimination 1-6"
end