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

22 lines
496 B

import { Pos } from "../../geo/Pos"
import { Segment } from "../../components/arrows/BendableArrow"
import { ComponentId } from "./Tactic"
export enum ActionKind {
SCREEN = "SCREEN",
DRIBBLE = "DRIBBLE",
MOVE = "MOVE",
SHOOT = "SHOOT",
}
export type Action = { type: ActionKind } & MovementAction
export interface MovementAction {
target: ComponentId | Pos
segments: Segment[]
}
export function moves(kind: ActionKind): boolean {
return kind != ActionKind.SHOOT
}