-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from inker/new-format
New CL format
- Loading branch information
Showing
22 changed files
with
1,567 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ export default { | |
wc: 2022, | ||
uefa: { | ||
cl: { | ||
gs: 2023, | ||
ls: 2024, | ||
ko: 2023, | ||
}, | ||
el: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; |
Oops, something went wrong.