MapKnowledge beta
Class of @v12-engine/engine/ai
export declare class MapKnowledgeWhat a computer player remembers of the map (knowledge.map): when each place was last in sight. The cells are of the view's grid (8 units)
Members
constructor
constructor(knowledge: Knowledge);Constructs a new instance of the MapKnowledge class
camps
camps(): readonly CampInfo[];The map's creep camps, as the seat knows them (view.camps)
explored
explored(point: Vec2): boolean;Whether the seat's team has explored a place: seen it once, as the fog says
inSight
inSight(point: Vec2): boolean;Whether a place is in sight now, as of the last update
lastLooked
lastLooked(point: Vec2): number | undefined;The tick a place was last in sight of the seat's team: none for a place never seen
look
look(point: Vec2, tick?: number): void;Takes in that a place was looked at, at a tick: where the game or an older save tells
mines
mines(): (MineInfo & {
looked?: number;
taken?: PlayerId;
})[];The map's mines (view.mines), each with when its place was last looked at and whose base is by it, as far as known: where to expand, where to look for theirs
sinceLooked
sinceLooked(point: Vec2): number;Seconds since a place was last in sight: Infinity for one never seen