AimOptions interface ALPHA
Options for aim(): the body arrays, an optional board and sight mask, and who counts as a foe.
export interface AimOptions {
x: Float64Array;
y: Float64Array;
/** Headings in radians (for `cone`); without them every cone is a circle. */
a?: Float64Array;
/** Velocities in px/s (for `lead`); without them targets stand still. */
vx?: Float64Array;
vy?: Float64Array;
/** Line of sight on this board (world px; its `cell` size); without one everything is in sight. */
board?: Board;
/** Cell flags that block sight (default 1: grid's BLOCKED; BLOCKED | COVER lets cover block). */
mask?: number;
/** Your own line of sight, used instead of `board` (a game whose tiles have their own rule). */
clear?(i: number, j: number): boolean;
/** May i shoot at j? (default: any j but i). With actors: `(i, j) => A.side[j] !== A.side[i]`. */
foe?(i: number, j: number): boolean;
}