fix: Hex Wars - Felsen im Nebel, kein Scrollen auf Mobile, Leaderboard-Refresh

This commit is contained in:
2026-06-26 16:30:21 +02:00
parent cfb66c23dc
commit afd2aa6029
2 changed files with 34 additions and 42 deletions

View File

@@ -160,8 +160,7 @@ function getGameForUser(id, requesterId) {
// Grid maskieren: versteckte Gegner-Felder als 0 zeigen, Terrain nur wo sichtbar
const maskedGrid = grid.map((row,r) => row.map((cell,c) => visible[r][c] ? cell : (cell === requesterId ? cell : 0)));
// Felsen sind immer sichtbar (Frontend braucht sie für canClick)
const maskedTerrain = terrain.map((row,r) => row.map((cell,c) => (visible[r][c] || cell === T_ROCK) ? cell : -1));
const maskedTerrain = terrain.map((row,r) => row.map((cell,c) => visible[r][c] ? cell : -1));
return { ...game, grid: JSON.stringify(maskedGrid), terrain: JSON.stringify(maskedTerrain), fog: JSON.stringify(visible) };
}