Fix: comps starting at 1/2 final
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Dorian Zedler 2022-07-28 19:50:18 +02:00
parent 146e3dd6c2
commit f6b4af7f04
Signed by: dorian
GPG key ID: 989DE36109AFA354

View file

@ -212,11 +212,12 @@ export function convertResultsToSpeedFlowchartResult(
// - 1, 4, 2, 3 for firstRoundNumber=4 // - 1, 4, 2, 3 for firstRoundNumber=4
// - 1, 2 for firstRoundNumber=2 // - 1, 2 for firstRoundNumber=2
// TODO: come up with a proper alogorithm maybe // TODO: come up with a proper alogorithm maybe
console.log('First round rank: ', firstRoundRank);
const ranksOfLaneAInOrder = [ const ranksOfLaneAInOrder = [
[1, 2], [1, 2],
[1, 4, 2, 3], [1, 4, 2, 3],
[1, 8, 4, 5, 2, 7, 3, 6], [1, 8, 4, 5, 2, 7, 3, 6],
][firstRoundRank / 4]; ][Math.floor(firstRoundRank / 4)];
const firstRoundPairs = ranksOfLaneAInOrder.map(rank => { const firstRoundPairs = ranksOfLaneAInOrder.map(rank => {
return { return {