forked from tcecspectator/mytcecgui
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathseeds.js
60 lines (55 loc) · 1.09 KB
/
seeds.js
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
globals
require
*/
'use strict';
let {LS} = require('./js/common.js'),
{calculate_seeds} = require('./js/game.js');
let engines_full = [
"Stockfish",
"LCZero",
"AllieStein",
"Stoofvlees",
"Komodo",
"Ethereal",
"rofChade",
"Fire",
"Booot",
"Defenchess",
"Fritz",
"Xiphos",
"ScorpioNN",
"Arasan",
"RubiChess",
"Pedone",
"Winter",
"Vajolet2",
"Chiron",
"Wasp",
"ChessBrainVB",
"Nemorino",
"Demolito",
"Gogobello",
"Igel",
"Minic",
"iCE",
"Marvin",
"Topple",
"Pirarucu",
"Counter",
"Asymptote",
];
let length = engines_full.length,
seeds = calculate_seeds(length, 1),
teams = seeds.map(seed => [seed, engines_full[seed - 1]]),
pairs = new Array(length / 2).fill(0).map((_, id) => [teams[id * 2], teams[id * 2 + 1]]),
patch = pairs.map(pair => [{name: pair[0][1], seed: pair[0][0]}, {name: pair[1][1], seed: pair[1][0]}]);
LS(seeds);
LS(teams);
LS(pairs);
LS(patch);
// if need to save the JSON:
if (0) {
let json = JSON.stringify(patch, null, 4);
LS(json);
}