-
Notifications
You must be signed in to change notification settings - Fork 8k
Basic tetris game #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kuaileyichu
wants to merge
493
commits into
vivienzou1:master
Choose a base branch
from
kuaileyichu:basic-tetris-game
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update 笔试-迅雷-180912.md ## AI-A-01的题目是说该数等于左边所有数之和且等于右边所有数之和 * Update 笔试-迅雷-180912.md
Update 合并排序链表——迭代实现 make the last node of the list point to nullptr.
修改欧氏距离和余弦相似度的取值范围。
This commit introduces a playable, text-based version of Tetris. Features: - Standard Tetromino shapes (I, J, L, O, S, T, Z) and rotations. - Game board with collision detection and row clearing. - Core game logic: piece spawning, gravity, locking pieces. - User input for moving (left, right, down), rotating, and hard-dropping pieces. - Text-based display in the terminal showing the board, current piece, next piece, and score. - Game over condition when new pieces cannot be spawned. - Basic scoring for clearing lines. The game is structured into modules: - `tetris/board.py`: Handles the game board state and operations. - `tetris/tetrominoes.py`: Defines Tetromino shapes and rotation logic. - `tetris/game.py`: Contains the main game class and core game mechanics. - `tetris/main.py`: Entry point for the game, handles user input and the main game loop. Unit tests have been added for board operations (row clearing) and Tetromino rotations, located in the `tetris/tests` directory.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
test Jules