modified: static/css/style.css

modified:   static/js/game.js
This commit is contained in:
SimolZimol
2026-08-07 21:49:03 +02:00
parent e62f42a23d
commit 8965399b08
2 changed files with 6 additions and 6 deletions

View File

@@ -287,22 +287,21 @@
return `<span class="num">${formatMoney(row.value)}</span>${arrowMoney(row.direction, row.diff)}`;
}
// Pfeil mit Zahl (z.B. Jahr): ▲ 5 / ▼ 3
// Pfeil nur (z.B. Jahr): ▲ / ▼ bei >6 Jahren Abweichung in Rot
function arrowDiff(dir, diff) {
if (dir === "equal" || diff == null) return "";
const cls = dir === "up" ? "up" : "down";
const gly = dir === "up" ? "▲" : "▼";
return `<span class="dir-pill ${cls}">${gly} ${Math.abs(diff)}</span>`;
const far = Math.abs(diff) > 6 ? " far" : "";
return `<span class="dir-pill ${cls}${far}">${gly}</span>`;
}
// Pfeil mit Differenz in Geld (Budget)
// Pfeil nur (Budget): ▲ / ▼
function arrowMoney(dir, diff) {
if (dir === "equal" || diff == null) return "";
const cls = dir === "up" ? "up" : "down";
const gly = dir === "up" ? "▲" : "▼";
const n = Math.abs(diff);
const txt = n >= 1000000 ? (n / 1000000).toFixed(0) + " Mio $" : Math.round(n / 1000) + " Tsd $";
return `<span class="dir-pill ${cls}">${gly} ${txt}</span>`;
return `<span class="dir-pill ${cls}">${gly}</span>`;
}
function cell(inner, status) {