1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-13 01:07:03 +00:00

Fixed bug with pool to bracket advancement. This bug was conceived due to the removing of tests and logic when making pool and pool_placement database fields.

This commit is contained in:
2019-12-12 11:19:24 -05:00
parent a8361593aa
commit e2ec1d4a8a
6 changed files with 71 additions and 21 deletions

View File

@@ -17,12 +17,10 @@ class AdvanceWrestler
end
def pool_to_bracket_advancement
if @wrestler.weight.all_pool_matches_finished(@wrestler.pool) and (@wrestler.finished_bracket_matches.size == 0 or @wrestler.weight.pools == 1)
if @wrestler.weight.all_pool_matches_finished(@wrestler.pool) and (@wrestler.finished_bracket_matches.size < 1)
PoolOrder.new(@wrestler.weight.wrestlers_in_pool(@wrestler.pool)).getPoolOrder
end
if @wrestler.weight.all_pool_matches_finished(@wrestler.pool)
PoolAdvance.new(@wrestler,@wrestler.last_match).advanceWrestler
end
PoolAdvance.new(@wrestler).advanceWrestler
end
end