mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
33 lines
651 B
TypeScript
33 lines
651 B
TypeScript
/**
|
|
* Class representing a City in the game
|
|
*/
|
|
import { CityName } from "./data/CityNames";
|
|
import { LocationName } from "./data/LocationNames";
|
|
|
|
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);
|
|
}
|
|
}
|