Skip to content

Commit

Permalink
Merge pull request #188 from inker/new-format
Browse files Browse the repository at this point in the history
New CL format
  • Loading branch information
inker authored Jul 3, 2024
2 parents 70e634d + bd34aa3 commit c4cf187
Show file tree
Hide file tree
Showing 22 changed files with 1,567 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
wc: 2022,
uefa: {
cl: {
gs: 2023,
ls: 2024,
ko: 2023,
},
el: {
Expand Down
154 changes: 154 additions & 0 deletions src/data/cl/ls/2024/pots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
[
[
{
"name": "Real Madrid",
"country": "Spain"
},
{
"name": "Man City",
"country": "England"
},
{
"name": "Bayern",
"country": "Germany"
},
{
"name": "Paris",
"country": "France"
},
{
"name": "Liverpool",
"country": "England"
},
{
"name": "Internazionale",
"country": "Italy"
},
{
"name": "Dortmund",
"country": "Germany"
},
{
"name": "Leipzig",
"country": "Germany"
},
{
"name": "Barcelona",
"country": "Spain"
}
],
[
{
"name": "Leverkusen",
"country": "Germany"
},
{
"name": "Atlético",
"country": "Spain"
},
{
"name": "Atalanta",
"country": "Italy"
},
{
"name": "Juventus",
"country": "Italy"
},
{
"name": "Benfica",
"country": "Portugal"
},
{
"name": "Arsenal",
"country": "England"
},
{
"name": "Club Brugge",
"country": "Belgium"
},
{
"name": "Rangers",
"country": "Scotland"
},
{
"name": "Shakhtar",
"country": "Ukraine"
}
],
[
{
"name": "Milan",
"country": "Italy"
},
{
"name": "Feyenoord",
"country": "Netherlands"
},
{
"name": "Sporting CP",
"country": "Portugal"
},
{
"name": "PSV",
"country": "Netherlands"
},
{
"name": "Slavia Praha",
"country": "Czechia"
},
{
"name": "Dinamo Zagreb",
"country": "Croatia"
},
{
"name": "Crvena zvezda",
"country": "Serbia"
},
{
"name": "PAOK",
"country": "Greece"
},
{
"name": "M Tel-Aviv",
"country": "Israel"
}
],
[
{
"name": "Ferencváros",
"country": "Hungary"
},
{
"name": "Celtic",
"country": "Scotland"
},
{
"name": "Monaco",
"country": "France"
},
{
"name": "Aston Villa",
"country": "England"
},
{
"name": "Bologna",
"country": "Italy"
},
{
"name": "Girona",
"country": "Spain"
},
{
"name": "Stuttgart",
"country": "Germany"
},
{
"name": "Sturm",
"country": "Austria"
},
{
"name": "Brest",
"country": "France"
}
]
]
15 changes: 15 additions & 0 deletions src/engine/dfs/ls/generatePairings/generateFull.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default <T>(teams: readonly T[], numTimes = 1) => {
const matches: (readonly [T, T])[] = [];
for (let k = 0; k < numTimes; ++k) {
for (let i = 0; i < teams.length - 1; ++i) {
for (let j = i + 1; j < teams.length; ++j) {
const match =
k & 1
? ([teams[j], teams[i]] as const)
: ([teams[i], teams[j]] as const);
matches.push(match);
}
}
}
return matches;
};
Loading

0 comments on commit c4cf187

Please sign in to comment.