mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
24 lines
530 B
TypeScript
24 lines
530 B
TypeScript
import { LocationName, CityName } from "@enums";
|
|
|
|
/** Class representing a City in the game */
|
|
export class City {
|
|
/** List of all locations in this city */
|
|
locations: LocationName[];
|
|
|
|
/** Name of this city */
|
|
name: CityName;
|
|
|
|
/** Metro map ascii art */
|
|
asciiArt: string;
|
|
|
|
constructor(name: CityName, locations: LocationName[] = [], asciiArt = "") {
|
|
this.name = name;
|
|
this.locations = locations;
|
|
this.asciiArt = asciiArt;
|
|
}
|
|
|
|
addLocation(loc: LocationName): void {
|
|
this.locations.push(loc);
|
|
}
|
|
}
|