import { Action, EntityData, EntityID, NextTurn, Location, TeamData, TeamID, MapFile, GameID, GameState, EntityType, Keyframe } from './schema'; import { Sector } from './zone'; import LocationMap from './locationmap'; export declare class Game { id: GameID; dead: EntityID[]; debug: boolean; entities: Map; highestId: number; nextTeam: TeamID; occupied: LocationMap; sectors: LocationMap; spawned: EntityID[]; teams: TeamData[]; turn: number; initialState: GameState; constructor(id: GameID, map: MapFile, teams: TeamData[], debug: boolean); /** * Returns the first turn of the match. * * firstTurn may throw an Error or ClientError, which should * be given to the user as a schema.ErrorCommand. */ firstTurn(): NextTurn; /** * Performs a list of actions on behalf of a team and returns * the result of those actions. * * makeTurn may throw an Error or ClientError, which should * be given to the user as a schema.ErrorCommand. */ makeTurn(team: TeamID, turn: number, actions: Action[]): NextTurn; private getWinningTeam(); private breakTie(); private getTeamIDWithHighestNumberOfEntries(entries); private makeNextTurn(); makeKeyframe(): Keyframe; /** * returns Sector based on location */ private getSector(location); private getEntity(id); private spawnEntity(entData); private dealDamage(id, damage); private getChangedSectors(); private getChangedEntities(); private getDeadEntities(); /** * Returns EntityData[] of throwers to be spawned in controlled sectors */ private getSpawnedThrowers(); private nextLocation(location); private doDisintegrate(entity, action); private doPickup(entity, action); private getTile(loc); private doThrow(entity, action); private doBuild(entity, action); private doMove(entity, action); private doAction(team, action); /** * Check invariants. */ private validate(); } /** * Acts like an EntityData, but when you set a property the "dirty" flag is set to true. */ export declare class Entity { private data; private _location; dirty: boolean; constructor(data: EntityData); checkChanged(): boolean; getData(): EntityData; id: EntityID; type: EntityType; hp: number; teamID: TeamID; cooldownEnd: number | undefined; heldBy: EntityID | undefined; holding: EntityID | undefined; holdingEnd: number | undefined; location: Location; }