Co-Pilot
Updated 24 days ago

tetris-game2

Ssakataka
0.0k
sakataka/tetris-game2
82
Agent Score

💡 Summary

A modern Tetris game built with React and TypeScript featuring advanced mechanics and AI mode.

🎯 Target Audience

Casual gamers looking for a classic experienceDevelopers interested in React and TypeScriptAI enthusiasts wanting to explore game strategiesMobile gamers seeking responsive gameplayLocalization experts focusing on internationalization

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

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.

5-Dim Analysis
Clarity9/10
Novelty7/10
Utility8/10
Completeness8/10
Maintainability9/10
Pros & Cons

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
toolCode Lib
92/ 100

“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
toolCode Lib
90/ 100

“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
toolCo-Pilot
90/ 100

“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.