-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
28 lines (23 loc) · 839 Bytes
/
Copy pathconstants.ts
File metadata and controls
28 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Team } from './types';
export const TEAMS: Team[] = [
{ name: 'You', players: [], score: 0 },
{ name: 'AI Team Alpha', players: [], score: 0 },
{ name: 'AI Team Bravo', players: [], score: 0 },
{ name: 'AI Team Charlie', players: [], score: 0 },
];
export const ROUNDS = 3;
export const PICKS_PER_ROUND = TEAMS.length;
const TOTAL_PICKS = ROUNDS * PICKS_PER_ROUND;
const generateDraftOrder = (): string[] => {
const order: string[] = [];
const teamNames = TEAMS.map(t => t.name);
for (let i = 0; i < ROUNDS; i++) {
const roundOrder = [...teamNames];
if (i % 2 !== 0) { // Snake draft reverses order on even rounds (0-indexed)
roundOrder.reverse();
}
order.push(...roundOrder);
}
return order;
};
export const DRAFT_ORDER = generateDraftOrder();