Skip to content

linglp/chinese-character-tetris

Repository files navigation

🎮 Chinese Character Tetris (汉字俄罗斯方块)

A fun and educational twist on the classic Tetris game that teaches Chinese vocabulary through gameplay! Instead of colored blocks, pieces are made of Chinese characters. When you complete a row containing valid Chinese words or phrases, you earn points and collect "food items" - traditional Chinese desserts and snacks!

🎯 Game Rules

Basic Gameplay

  • Falling Pieces: Tetris shapes fall from the top of the board, each made up of Chinese characters
  • Movement Controls:
    • ←/→ Arrow Keys: Move piece left or right
    • ↓ Arrow Key: Speed up the piece falling
    • ↑ Arrow Key: Rotate the piece 90° clockwise
  • Auto-Drop: Pieces automatically fall down one row every second
  • Line Completion: When a horizontal row is completely filled, it gets cleared and you earn 10 points per row

Word Collection System 🥟

What makes this game special is the word collection feature:

  • When you clear a filled row, the game scans for valid Chinese words
  • Valid words are matched against a vocabulary list of 100+ traditional Chinese foods
  • Discovered words appear in the "Food collected" panel with their English explanations
  • Examples: 粽子 (zòngzi - rice dumplings), 月饼 (yuèbǐng - mooncakes), 汤圆 (tāngyuán - glutinous rice balls)

Game Over

The game ends when:

  • Pieces stack up to the top row of the board
  • The board has 15 rows × 10 columns, so plan your moves carefully!

✨ Features

🎵 Audio & Visual

  • Background Music: Classic Tetris theme plays during gameplay
  • Sound Effects: Button press sounds when moving pieces left/right
  • Cute Design: Pastel purple/pink color scheme with playful Comic Sans font
  • Smooth Animations: Pieces move fluidly with visual transitions

📊 Statistics Tracking

  • Real-time Score: Updated score display showing points earned
  • Timer: Tracks how long you've been playing the current game
  • Food Collection: Visual list showing:
    • Chinese word (e.g., 粽子)
    • Count of how many times collected (e.g., × 3)
    • English explanation with cultural context

🎓 Educational Value

  • Learn 100+ traditional Chinese food vocabulary items
  • Includes desserts eaten during festivals like:
    • Mid-Autumn Festival (月饼, 桂花糕)
    • Dragon Boat Festival (粽子)
    • Chinese New Year (年糕, 春卷)
    • Lantern Festival (汤圆, 元宵)
  • Each word comes with detailed cultural explanations

About

Build a tetris game using react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages