https://github.com/dokadev/vue_tetris
Simple Tetris Game
https://github.com/dokadev/vue_tetris
vuejs
Last synced: 5 months ago
JSON representation
Simple Tetris Game
- Host: GitHub
- URL: https://github.com/dokadev/vue_tetris
- Owner: DokaDev
- License: mit
- Created: 2025-03-11T06:41:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T13:59:44.000Z (about 1 year ago)
- Last Synced: 2025-06-06T14:36:29.112Z (about 1 year ago)
- Topics: vuejs
- Language: Vue
- Homepage: https://tetris.dokalab.site
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vue Tetris
A web-based Tetris game built with Vue.js.
## Features
- Responsive Tetris game based on Vue.js
- Standard Tetris rules applied (bag system)
- Hold function support (C key)
- Keyboard control support (arrow keys and space bar)
- Next block preview
- Level system and scoring system
## Installation and Running
1. Clone the repository
```bash
git clone https://github.com/yourusername/tetris.git
cd tetris
```
2. Install dependencies
```bash
npm install
```
3. Run development server
```bash
npm run dev
```
4. Build
```bash
npm run build
```
## Game Controls
- ← → : Move left/right
- ↑ : Rotate clockwise
- Z : Rotate counter-clockwise
- X : Rotate clockwise
- ↓ : Soft drop (move down one space)
- Space : Hard drop (drop to the bottom)
- C : Hold (store/swap current block)
## Game System
### Bag System
- Seven different Tetris blocks (I, J, L, O, S, T, Z) are in one bag.
- The same block will not appear again until all blocks from one bag have appeared once.
- A new bag is created when all 7 blocks have been used.
### Hold System
- Press the C key to store the current block in the hold slot.
- The held block is exchanged with the current block when the C key is pressed again.
- Each block can only be held once until it is placed on the field.
## Scoring System
- 1 line cleared: 100 × current level
- 2 lines cleared: 300 × current level
- 3 lines cleared: 500 × current level
- 4 lines cleared: 800 × current level
## Technology Stack
- Vue.js
- HTML/CSS
- JavaScript