have events display show outgoing & incoming attacks

This commit is contained in:
Evan
2025-02-11 14:09:00 -08:00
parent 11c12cd1b3
commit 19d0b61869
2 changed files with 87 additions and 9 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ export function renderTroops(troops: number): string {
}
export function renderNumber(num: number) {
num = Math.max(num, 0);
let numStr = "";
if (num >= 10_000_000) {
numStr = (num / 1000000).toFixed(1) + "M";
@@ -51,7 +52,7 @@ export function generateCryptoRandomUUID(): string {
(
c ^
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))
).toString(16),
).toString(16)
);
}
@@ -63,6 +64,6 @@ export function generateCryptoRandomUUID(): string {
const r: number = (Math.random() * 16) | 0;
const v: number = c === "x" ? r : (r & 0x3) | 0x8;
return v.toString(16);
},
}
);
}