gameDefinition.ts 974 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. score: number | null
  18. displayContent: GameControlDisplayContent | null
  19. }
  20. export interface GameDefinition {
  21. id: string
  22. mode: GameMode
  23. title: string
  24. controlRadiusMeters: number
  25. punchRadiusMeters: number
  26. punchPolicy: PunchPolicyType
  27. requiresFocusSelection: boolean
  28. skipEnabled: boolean
  29. skipRadiusMeters: number
  30. skipRequiresConfirm: boolean
  31. controls: GameControl[]
  32. autoFinishOnLastControl: boolean
  33. audioConfig?: GameAudioConfig
  34. }