View Source ExTournaments.Pairings.DoubleElimination.BuildUpperBracketFlow (ExTournaments v0.5.1)
Module for building matches flow in the upper bracket depending on the remainder value
Link to this section Summary
Functions
Takes existing list of %ExTournaments.Match{}
structs, indices of the round in the upper and lower bracket, difference between this indices,
remainder and exponent from the difference between number of participants and power of 2. It determines the flow to use to populate matches flow
by the value of remainder.
Link to this section Functions
call(matches, win_round, lose_round, fill_count, round_diff, exponent, remainder)
View Source@spec call( [ExTournaments.Match.t()], non_neg_integer(), non_neg_integer(), non_neg_integer(), integer(), number(), number() ) :: %{ fill_count: non_neg_integer(), lose_round: non_neg_integer(), matches: [ExTournaments.Match.t()], win_round: non_neg_integer() }
Takes existing list of %ExTournaments.Match{}
structs, indices of the round in the upper and lower bracket, difference between this indices,
remainder and exponent from the difference between number of participants and power of 2. It determines the flow to use to populate matches flow
by the value of remainder.
Returns list of %ExTournaments.Match{}
structs with updated values for next matches after win or loss in the upper bracket.