Skip to content

Commit 520e440

Browse files
committed
Create tournaments for seasons
1 parent f2d2054 commit 520e440

File tree

6 files changed

+940
-383
lines changed

6 files changed

+940
-383
lines changed
Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,16 @@
11
Tournament Scheduling & Preemption
22

3-
Daily/Hourly Rules (UTC)
43

5-
Rookie: every 4 hours except 16:00.
4+
Grand Slam: every last season day(21st of December/March/June/September) 16:00 UTC
65

7-
Challenger: daily at 16:00, unless preempted by a higher grade that day/week.
6+
Masters: 21st of every first and second month of the season 16:00 UTC
87

9-
Weekly Slots (16:00 UTC)
8+
Elite: every 7th of every month in the season 16:00 UTC
109

11-
Priority: grand_slam > masters > elite > pro.
10+
Pro: every 14th and 28th of every month in the season 16:00 UTC
1211

13-
In any given week, exactly one of pro/elite/masters/grand_slam runs at 16:00.
12+
Challenger: every day at 16:00 UTC except days where higher priority tournaments are scheduled.
1413

15-
Canonical Weekly Pattern (per 12–13‑week season)
14+
Rookie: every 3 hours 0,3,6,9,12,15,18,21 hours every day.
1615

17-
Weeks without special events alternate pro and elite as backbone, with masters approximately once per month (Thu). Example outline:
18-
19-
w1 Tue: pro
20-
w2 Wed: elite
21-
w3 Tue: pro
22-
w4 Thu: masters
23-
w5 Tue: pro
24-
w6 Wed: elite
25-
w7 Tue: pro
26-
w8 Thu: masters
27-
w9 Tue: pro
28-
w10 Wed: elite
29-
w11 Tue: pro
30-
w12 21st: grand_slam
31-
w13 Tue: pro (if present within season window)
32-
33-
Exact weekdays for masters/grand_slam follow the 21st constraint and season calendar; if a masters week is selected, no pro/elite that week. On a grand_slam week, only grand_slam at 16:00.
34-
35-
Deterministic Planner (Pseudo‑code)
36-
37-
input: season_start, season_end
38-
for each day in [season_start, season_end]:
39-
if hour==16:00:
40-
if date == season_end (21st): schedule grand_slam
41-
else if is_thursday and is_monthly_slot and not special_week: schedule masters
42-
else if is_wednesday and is_biweekly_slot and not masters_week: schedule elite
43-
else if is_tuesday and not elite_week and not masters_week: schedule pro
44-
else: schedule challenger
45-
else:
46-
if hour != 16:00: schedule rookie hourly
47-
48-
biweekly_slot can be tracked as every second Wednesday in the season window.
49-
50-
monthly_slot for masters is the nearest Thursday not colliding with GS.
51-
52-
Preemption means the higher‑priority grade replaces challenger that day and replaces lower grades in that week as per rules.
16+
Priority: grand_slam > masters > elite > pro > challenger > rookie

services/app/apps/codebattle/assets/js/widgets/pages/lobby/TournamentListItem.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,12 @@ const TournamentTitle = ({ tournament }) => {
5959
);
6060
}
6161

62-
const words = tournament.name.split(' ');
6362
const subtitle = dayjs(tournament.startsAt).format('MMM D, YYYY [at] HH:mm');
64-
words.pop();
65-
const title = words.join(' ');
6663

6764
return (
6865
<div className="d-flex flex-column align-items-baseline">
6966
<span className="h5 mb-1 font-weight-bold text-white text-truncate d-inline-block">
70-
{title}
67+
{tournament.name}
7168
</span>
7269
<span className="small">{subtitle}</span>
7370
</div>

0 commit comments

Comments
 (0)