@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
33 lines (30 loc) • 894 B
text/typescript
import type { ColorName } from '../color';
import type { GameType } from '../game';
import type { GameTrack } from '../gameTrack';
import type { KartShield } from './KartShield';
import type { KartStatus } from './KartStatus';
interface KartGame {
id: number;
type: GameType;
}
export interface Kart {
/** Unique ID by kart */
guid: string;
/** kartGuid assigned by Game Track (multiple karts could have the same Id) */
id: number;
mac: string;
hostname: string;
isConnected: boolean;
status: KartStatus;
shield: KartShield;
// If a Kart is not assigned to a game, the default gane track should be "TEST"
gameTrackId: GameTrack['id'];
color: ColorName;
number: number;
currentGame?: KartGame | null;
description?: string | null;
/**
* In testing Mode, the kart should be listening to the hardware status
*/
isSubscribedToHardwareStatus: boolean;
}