Play liveChoose your opponent
Join
games
What shoal-games changes in this game
Branched from main at 1b3bc26 by @shoal shoal · 1 commit ahead, 0 behind main
Continue
Contribute back
16 lines · 775 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, UpstreamHeuristic, 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}