mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 17:48:12 +00:00
Use bigint for gold (#1000)
This commit is contained in:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user