mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 02:33:26 +00:00
add comment to unused labelUpload method and clean up removeUnit ordering
- Move unitGrid.removeUnit() call to beginning of removeUnit method for cleaner code organization
This commit is contained in:
@@ -764,10 +764,10 @@ export class GameImpl implements Game {
|
||||
}
|
||||
}
|
||||
removeUnit(u: Unit) {
|
||||
this.unitGrid.removeUnit(u);
|
||||
if (u.type() === UnitType.DefensePost) {
|
||||
this.updateDefendedStateForDefensePost(u.tile(), u.owner() as PlayerImpl);
|
||||
}
|
||||
this.unitGrid.removeUnit(u);
|
||||
if (u.hasTrainStation()) {
|
||||
this._railNetwork.removeStation(u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user