You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Application-Web/front/model/tactic/Tactic.ts

38 lines
850 B

import {Player} from "./Player"
import {Action} from "./Action"
import {CourtObject} from "./Ball"
export interface Tactic {
id: number
name: string
content: TacticContent
}
export interface TacticContent {
components: TacticComponent[]
actions: Action[]
}
export type TacticComponent = Player | CourtObject
export type ComponentId = string
export interface Component<T> {
/**
* The component's type
*/
readonly type: T
/**
* The component's identifier
*/
readonly id: ComponentId
/**
* Percentage of the player's position to the bottom (0 means top, 1 means bottom, 0.5 means middle)
*/
readonly bottomRatio: number
/**
* Percentage of the player's position to the right (0 means left, 1 means right, 0.5 means middle)
*/
readonly rightRatio: number
}