bitburner-src/src/Locations/City.ts

24 lines
530 B
TypeScript
Raw Normal View History

import { LocationName, CityName } from "@enums";
/** Class representing a City in the game */
export class City {
/** List of all locations in this city */
2021-09-05 01:09:30 +02:00
locations: LocationName[];
/** Name of this city */
2021-09-05 01:09:30 +02:00
name: CityName;
/** Metro map ascii art */
2021-09-05 01:09:30 +02:00
asciiArt: string;
2021-09-05 01:09:30 +02:00
constructor(name: CityName, locations: LocationName[] = [], asciiArt = "") {
this.name = name;
this.locations = locations;
this.asciiArt = asciiArt;
}
2021-09-05 01:09:30 +02:00
addLocation(loc: LocationName): void {
this.locations.push(loc);
}
}