Use bigint for gold (#1000)

This commit is contained in:
Scott Anderson
2025-06-02 15:48:24 -04:00
committed by 1brucben
parent cbecfac981
commit e763ade705
20 changed files with 128 additions and 101 deletions
+2 -1
View File
@@ -4,7 +4,8 @@ export function renderTroops(troops: number): string {
return renderNumber(troops / 10);
}
export function renderNumber(num: number): string {
export function renderNumber(num: number | bigint): string {
num = Number(num);
num = Math.max(num, 0);
if (num >= 10_000_000) {