💡 Summary
A modern Tetris game built with React and TypeScript featuring advanced mechanics and AI mode.
🎯 Target Audience
🤖 AI Roast: “Powerful, but the setup might scare off the impatient.”
Risk: Medium. Review: shell/CLI command execution. Run with least privilege and audit before enabling in production.
🎮 Tetris Game
A modern Tetris implementation built with React, TypeScript, and Bun.
✨ Features
- Classic Tetris gameplay with all seven tetrominoes
- Advanced mechanics: Super Rotation System (SRS), T-Spin detection, hold piece
- Responsive design for desktop and mobile
- Internationalization: English and Japanese support
- AI mode: Watch the AI play with configurable strategies
🎮 Controls
Desktop
- Arrow Keys: Move left/right/down
- Up Arrow: Rotate clockwise
- Space: Hard drop
- Shift: Hold piece
- P: Pause
- R: Reset
Mobile
Touch controls with on-screen buttons
🚀 Getting Started
# Install dependencies bun install # Start development bun run dev # Run tests bun test
🛠️ Tech Stack
- Runtime: Bun 1.3.5
- Frontend: React 19.2.4 + TypeScript 5.9.3
- State: Zustand 5.0.10
- Styling: Tailwind CSS 4.1.18 + Radix UI
- Build: Rolldown-Vite 7.3.1
- Testing: Bun Test + fast-check
📁 Project Structure
src/
├── App.tsx # Main application component
├── game/ # Core game logic
├── ui/ # UI components
├── assets/ # Static assets and locales (en, ja)
├── hooks/ # Custom React hooks
└── types/ # TypeScript definitions
🧪 Development
bun run dev # Development server bun test # Run tests bun run format # Format code (write) bun run format:check # Check formatting bun run lint # Lint & auto-fix bun run lint:check # Lint (check only) bun run typecheck # Type checking bun run build # Production build bun run check:i18n # Check i18n key consistency
🌍 Internationalization
The game supports two languages:
- English (
en) - Default language - Japanese (
ja) - Full Japanese localization
Translation files are located in src/assets/locales/. Language settings are persisted in localStorage and synchronized with the game state.
A modern take on the classic game, optimized for performance and developer experience.
Pros
- Engaging classic gameplay
- Advanced mechanics enhance strategy
- Responsive design for various devices
- Internationalization support
Cons
- Limited language support (only English and Japanese)
- Dependency on Bun runtime
- Potentially steep learning curve for beginners
- AI mode may not appeal to all players
Related Skills
pytorch
S“It's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”
agno
S“It promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”
nuxt-skills
S“It's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”
Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.
Copyright belongs to the original author sakataka.
