feat: enhance custom game difficulty calculation and UI

This commit is contained in:
2026-02-11 03:03:14 +01:00
parent a42738cbe2
commit 661dc37e70
3 changed files with 55 additions and 25 deletions

View File

@@ -231,7 +231,8 @@ const buildShareSVG = () => {
// Difficulty Logic
const densityPercent = Math.round(store.currentDensity * 100);
const difficultyKey = calculateDifficulty(store.currentDensity);
const diffInfo = calculateDifficulty(store.currentDensity, store.size);
const difficultyKey = diffInfo.level;
let diffColor = '#33ff33';
if (difficultyKey === 'extreme') diffColor = '#ff3333';
else if (difficultyKey === 'hardest') diffColor = '#ff9933';