mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 11:32:04 +00:00
Refactor Railroad and TrainStation classes to improve railroad management
- Replaced direct deletion of railroads with dedicated methods in TrainStation for better encapsulation. - Added a mapping for quick lookup of railroads by neighboring stations. - Updated clearRailroads and addRailroad methods to maintain consistency in railroad management.
This commit is contained in:
@@ -139,7 +139,6 @@ export class TrainStation {
|
||||
private railroads: Set<Railroad> = new Set();
|
||||
// Quick lookup from neighboring station to connecting railroad
|
||||
private railroadByNeighbor: Map<TrainStation, Railroad> = new Map();
|
||||
|
||||
// Batman routing properties - now using IDs for memory efficiency
|
||||
private routingTable: Map<number, RoutingEntry> = new Map();
|
||||
private sequenceNumber: number = 0;
|
||||
|
||||
Reference in New Issue
Block a user