src/core/game/StatsImpl.ts

This commit is contained in:
Scott Anderson
2025-05-16 16:42:31 -04:00
parent 03cef7ff06
commit 921cbbdf45
+4 -2
View File
@@ -15,13 +15,15 @@ export class StatsImpl implements Stats {
[UnitType.MIRVWarhead]: 0,
[UnitType.AtomBomb]: 0,
[UnitType.HydrogenBomb]: 0,
};
} satisfies Record<NukeType, number>;
}
}
increaseNukeCount(sender: PlayerID, target: PlayerID, type: NukeType): void {
this._createUserData(sender, target);
this.data[sender].sentNukes[target][type]++;
const d = this.data[sender].sentNukes[target];
const v = d[type] ?? 0;
d[type] = v + 1;
}
getPlayerStats(player: PlayerID): PlayerStats {