Snake Game
This project is a modern, browser-based Snake game built with React and TypeScript, designed to deliver classic arcade gameplay with a polished UI on both desktop and mobile. The system focuses on clean separation of game logic and presentation, responsive layout, and stable real-time state updates in a fixed-interval game loop.
The core focus of the project is on predictable game state management, cross-device input handling, and maintaining smooth performance without unnecessary re-renders.
Front-End Developer (React / TypeScript) Responsible for implementing game logic, UI/UX, responsive layout, input handling (keyboard, touch, swipe), state management, and local persistence.
All core game state and rules live in a dedicated hook, keeping the UI component focused on rendering and user interaction.
The current direction is stored in a ref to avoid stale closures inside the interval-based game tick and to prevent invalid reverse moves.
Game rules, rendering, and helper functions (food generation, wrapping, speed calculation) are split into separate modules for clarity and maintainability.
The game board is rendered with CSS Grid instead of Canvas, enabling simpler styling, emoji food rendering, and responsive scaling.
Custom CSS was chosen for full control over animations, glassmorphism effects, and mobile-specific layout without extra dependencies.
High score and speed level are stored locally without a backend, keeping the app fully static and deployable anywhere.
This project demonstrates practical front-end engineering beyond simple UI: managing real-time state in React, designing cross-device interactions, and structuring a small codebase for clarity and extensibility. It shows attention to UX details (responsive board, swipe, persistence) while keeping the architecture simple and maintainable.