Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
inker committed Jul 3, 2024
1 parent 159d8a6 commit 07b0ca0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/dfs/ls/generatePairings/getFirstSuitableMatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ export default ({
boolean
> = {};

const unorderedPotPairs = cartesian(potIndices, potIndices);
const potPairs = orderBy(unorderedPotPairs, [m => m[0], m => m[1]]);

for (const m of pickedMatches) {
const homeTeam = teams[m[0]];
const awayTeam = teams[m[1]];
Expand Down Expand Up @@ -90,6 +87,9 @@ export default ({
return true;
});

const unorderedPotPairs = cartesian(potIndices, potIndices);
const potPairs = orderBy(unorderedPotPairs, [m => m[0], m => m[1]]);

const orderedRemainingGames = orderBy(remainingGames, [
m => {
const hPot = Math.floor(m[0] / numTeamsPerPot);
Expand Down

0 comments on commit 07b0ca0

Please sign in to comment.