Play liveChoose your opponent
Join
32fe633
16 lines · 756 Bytes Raw Permalink History
1// The bundle's entry (referee/sgs.mjs): the upstream engine with this project's table, check, room and the upstream AI.
2import { allCharacters } from '../src/engine/data/characters';
3import { skillInfo } from './table';
4
5export { play } from './play';
6export { room } from './room';
7export { Heuristic, Table, skillInfo } from './table';
8
9/** Every general with its faction, health and skills (the upstream's own skill texts): referee/generals.json. */
10export async function catalog(): Promise<Record<string, object>> {
11 const out: Record<string, object> = {};
12 for (const c of allCharacters) {
13 out[c.name] = { faction: c.faction, maxHealth: c.maxHealth, gender: c.gender, skills: await skillInfo(c.skills.map((s) => s.name)) };
14 }
15 return out;
16}