sakataka/tetris-game2

No description

0 stars0 forksUpdated Jan 24, 2026
npx skills add sakataka/tetris-game2

README

๐ŸŽฎ 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.3 + TypeScript 5.9.3
  • State: Zustand 5.0.9
  • Styling: Tailwind CSS 4.1.18 + Radix UI
  • Build: Rolldown-Vite 7.3.0
  • 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 lint       # Lint & format code
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.

Publisher

sakatakasakataka

Statistics

Stars0
Forks0
Open Issues0
CreatedJun 21, 2025