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/src/model/tactic/Action.ts

27 lines
513 B

import { Pos } from "../../geo/Pos"
import { ComponentId } from "./TacticInfo.ts"
export enum ActionKind {
SCREEN = "SCREEN",
DRIBBLE = "DRIBBLE",
MOVE = "MOVE",
SHOOT = "SHOOT",
}
export type Action = MovementAction
export interface Segment {
next: Pos | string
controlPoint?: Pos
}
export interface MovementAction {
type: ActionKind
target: ComponentId | Pos
segments: Segment[]
}
export function moves(kind: ActionKind): boolean {
return kind != ActionKind.SHOOT
}