tobogganSe connecter

starfleet-ui

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

49 lignes · 1407 octetsBrut · Historique
1/** Small hand-made galaxy shared by the game-logic tests. */
2import type { Envelope, SystemDetail, Waypoint } from '../types';
3
4const env = <T>(data: T): Envelope<T> => ({ data, links: {}, actions: [] });
5const wp = (symbol: string, kind: Waypoint['kind'], x: number, y: number): Envelope<Waypoint> =>
6 env({ symbol, system: symbol.replace(/-[A-Z]$/, ''), kind, x, y });
7
8// A —(500)— B —(1000)— C, and a slow direct A —(4000)— C lane.
9export const DETAILS: SystemDetail[] = [
10 {
11 symbol: 'AA-1',
12 x: 0,
13 y: 0,
14 charted: true,
15 nebula: false,
16 first_charter: null,
17 lanes: [
18 { system: 'BB-2', distance: 500, href: '' },
19 { system: 'CC-3', distance: 4000, href: '' }
20 ],
21 waypoints: [wp('AA-1-A', 'station', 0, 0), wp('AA-1-B', 'jump_gate', 30, 40), wp('AA-1-C', 'asteroid_field', 60, 0)]
22 },
23 {
24 symbol: 'BB-2',
25 x: 500,
26 y: 0,
27 charted: true,
28 nebula: true,
29 first_charter: null,
30 lanes: [
31 { system: 'AA-1', distance: 500, href: '' },
32 { system: 'CC-3', distance: 1000, href: '' }
33 ],
34 waypoints: [wp('BB-2-A', 'jump_gate', 0, 0), wp('BB-2-B', 'station', 0, 90)]
35 },
36 {
37 symbol: 'CC-3',
38 x: 1500,
39 y: 0,
40 charted: true,
41 nebula: false,
42 first_charter: null,
43 lanes: [
44 { system: 'BB-2', distance: 1000, href: '' },
45 { system: 'AA-1', distance: 4000, href: '' }
46 ],
47 waypoints: [wp('CC-3-A', 'jump_gate', 0, 0), wp('CC-3-B', 'station', 120, 160)]
48 }
49];