import { Location } from './schema'; /** A map from locations to entities */ export default class LocationMap { items: T[]; width: number; height: number; constructor(width: number, height: number); private _validate(x, y); /** * Set a location to a value. */ set(x: number, y: number, v: T): void; /** * Set a location to undefined. */ delete(x: number, y: number): void; /** * Check if a location is not undefined. */ has(x: number, y: number): boolean; /** * Get the entry stored at a location. */ get(x: number, y: number): T | undefined; /** * Iterate through the values in the map. */ values(): Array; /** * Iterate through the (set) keys in the map. */ keys(): Array; /** * Iterate through the entries in the map. */ entries(): Array<[Location, T]>; }