gameDefinition.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. autoPopup: boolean
  10. once: boolean
  11. priority: number
  12. }
  13. export interface GameControlDisplayContentOverride {
  14. title?: string
  15. body?: string
  16. autoPopup?: boolean
  17. once?: boolean
  18. priority?: number
  19. }
  20. export interface GameControl {
  21. id: string
  22. code: string
  23. label: string
  24. kind: GameControlKind
  25. point: LonLatPoint
  26. sequence: number | null
  27. score: number | null
  28. displayContent: GameControlDisplayContent | null
  29. }
  30. export interface GameDefinition {
  31. id: string
  32. mode: GameMode
  33. title: string
  34. controlRadiusMeters: number
  35. punchRadiusMeters: number
  36. punchPolicy: PunchPolicyType
  37. requiresFocusSelection: boolean
  38. skipEnabled: boolean
  39. skipRadiusMeters: number
  40. skipRequiresConfirm: boolean
  41. controls: GameControl[]
  42. autoFinishOnLastControl: boolean
  43. audioConfig?: GameAudioConfig
  44. }