gameDefinition.ts 836 B

123456789101112131415161718192021222324252627282930313233
  1. import { type LonLatPoint } from '../../utils/projection'
  2. import { type GameAudioConfig } from '../audio/audioConfig'
  3. export type GameMode = 'classic-sequential' | 'score-o'
  4. export type GameControlKind = 'start' | 'control' | 'finish'
  5. export type PunchPolicyType = 'enter' | 'enter-confirm'
  6. export interface GameControlDisplayContent {
  7. title: string
  8. body: string
  9. }
  10. export interface GameControl {
  11. id: string
  12. code: string
  13. label: string
  14. kind: GameControlKind
  15. point: LonLatPoint
  16. sequence: number | null
  17. displayContent: GameControlDisplayContent | null
  18. }
  19. export interface GameDefinition {
  20. id: string
  21. mode: GameMode
  22. title: string
  23. controlRadiusMeters: number
  24. punchRadiusMeters: number
  25. punchPolicy: PunchPolicyType
  26. controls: GameControl[]
  27. autoFinishOnLastControl: boolean
  28. audioConfig?: GameAudioConfig
  29. }