This commit is contained in:
gpt-engineer-app[bot]
2026-01-09 11:20:38 +00:00
parent 192164ee74
commit 0bf52ba489
4 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -91,15 +91,15 @@ const Pacman = () => {
const { enterFullscreen, exitFullscreen } = useBrowserFullscreen();
const getCellSize = useCallback(() => {
if (typeof window === 'undefined') return 20;
if (typeof window === 'undefined') return 24;
const isMobile = window.innerWidth < 768;
if (isMobile) {
const maxWidth = window.innerWidth - 40;
// Reserve space for header + fixed controls dock on mobile
const maxHeight = window.innerHeight - 420;
return Math.min(Math.floor(maxWidth / GRID_WIDTH), Math.floor(maxHeight / GRID_HEIGHT), 16);
return Math.min(Math.floor(maxWidth / GRID_WIDTH), Math.floor(maxHeight / GRID_HEIGHT), 18);
}
return isFullscreen ? 26 : 20;
return isFullscreen ? 30 : 24;
}, [isFullscreen]);
const [cellSize, setCellSize] = useState(getCellSize);