tetris
๐ฎ A C++20 Tetris game running in the Linux terminal.๏ผไฝฟ็จC++20ๅผๅ็Linux็ป็ซฏ็ไฟ็ฝๆฏๆนๅๆธธๆใ๏ผ
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
โCITATION.cff file
Found CITATION.cff file -
โcodemeta.json file
Found codemeta.json file -
โ.zenodo.json file
Found .zenodo.json file -
โDOI references
-
โAcademic publication links
-
โAcademic email domains
-
โInstitutional organization owner
-
โJOSS paper metadata
-
โScientific vocabulary similarity
Low similarity (6.6%) to scientific vocabulary
Keywords
Repository
๐ฎ A C++20 Tetris game running in the Linux terminal.๏ผไฝฟ็จC++20ๅผๅ็Linux็ป็ซฏ็ไฟ็ฝๆฏๆนๅๆธธๆใ๏ผ
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Tetris
Introduction

A Tetris game running in the Linux terminal.
Prerequisites
- Install CMake.
- Install GoogleTest.
- Install ncurses.
Building
Set the location to the project folder and run:
bash
mkdir build
cd build
cmake -DTETRIS_BUILD_TESTS=ON ..
cmake --build .
Running Tests
Set the location to the build folder and run:
bash
ctest -VV
Running the Game
Set the location to the build/bin folder and run:
bash
./tetris -x=<width> -y=<height>
For example:
bash
./tetris -x=10 -y=15
Structure
.
โโโ .clang-format
โโโ .gitignore
โโโ CITATION.cff
โโโ CMakeLists.txt
โโโ Dockerfile
โโโ LICENSE
โโโ README.md
โโโ cover.png
โโโ docs
โ โโโ badges
โ โโโ C++.svg
โ โโโ License-MIT.svg
โ โโโ Linux.svg
โ โโโ Made-with-CMake.svg
โ โโโ Made-with-GitHub-Actions.svg
โ โโโ Made-with-Docker.svg
โโโ include
โ โโโ args.h
โ โโโ color.h
โ โโโ controller.h
โ โโโ game.h
โ โโโ grid.h
โ โโโ location.h
โ โโโ rotation.h
โ โโโ shape.h
โ โโโ tetromino.h
โโโ src
โ โโโ CMakeLists.txt
โ โโโ args
โ โ โโโ CMakeLists.txt
โ โ โโโ args.cpp
โ โโโ color
โ โ โโโ CMakeLists.txt
โ โ โโโ color.cpp
โ โโโ controller
โ โ โโโ CMakeLists.txt
โ โ โโโ controller.cpp
โ โ โโโ ui
โ โ โโโ board.h
โ โ โโโ color_env.cpp
โ โ โโโ color_env.h
โ โ โโโ grid_board.h
โ โ โโโ next_tetromino_board.h
โ โ โโโ score_board.h
โ โโโ game
โ โ โโโ CMakeLists.txt
โ โ โโโ game.cpp
โ โโโ grid
โ โ โโโ CMakeLists.txt
โ โ โโโ grid.cpp
โ โโโ location
โ โ โโโ CMakeLists.txt
โ โโโ main.cpp
โ โโโ rotation
โ โ โโโ CMakeLists.txt
โ โ โโโ rotation.cpp
โ โโโ shape
โ โ โโโ CMakeLists.txt
โ โโโ tetromino
โ โโโ CMakeLists.txt
โ โโโ subtype
โ โ โโโ i.h
โ โ โโโ j.h
โ โ โโโ l.h
โ โ โโโ o.h
โ โ โโโ s.h
โ โ โโโ t.h
โ โ โโโ z.h
โ โโโ tetromino.cpp
โโโ tests
โโโ CMakeLists.txt
โโโ grid_test.cpp
โโโ rotation_test.cpp
โโโ tetromino_test.cpp
Class Diagram
```mermaid classDiagram
class Colored {
<
class Rotatable {
<
class Locatable {
<
class Movable {
<
Locatable <|-- Movable
class Shape {
<
class Tetromino {
<
Shape <|.. Tetromino Rotatable <|.. Tetromino Colored <|.. Tetromino
Tetromino <|-- I Tetromino <|-- O Tetromino <|-- J Tetromino <|-- L Tetromino <|-- S Tetromino <|-- T Tetromino <|-- Z
class Grid { GetColor(Point) Color PushTetromino(Tetromino, Point) bool MoveTetrominoToLeft() bool MoveTetrominoToRight() bool RotateTetrominoLeft() bool RotateTetrominoRight() bool TetrominoDescend(int& clearedlinecount) bool }
Shape <|.. Grid Grid *-- Tetromino
Movable <|.. MovableTetromino MovableTetromino --> Tetromino Grid --> MovableTetromino
class Action {
<
class Game { Start() Act(Action) ActionResult GetNextTetrominoes() Tetromino GetScore() int IsOver() bool }
Game --> Grid Game ..> Action
class Controller { Input() Update() Refresh() }
Controller --> Game ```
License
Distributed under the MIT License. See LICENSE for more information.
Owner
- Name: Zhuagenborn
- Login: Zhuagenborn
- Kind: organization
- Location: Ireland
- Repositories: 3
- Profile: https://github.com/Zhuagenborn
Software Development | Artificial Intelligence | Reverse Engineering.
Citation (CITATION.cff)
cff-version: 1.2.0 authors: - family-names: Chen given-names: Zhenshuo orcid: https://orcid.org/0000-0003-2091-4160 - family-names: Liu given-names: Guowen orcid: https://orcid.org/0000-0002-8375-5729 title: Tetris date-released: 2023-04-30 url: https://github.com/Zhuagenborn/Tetris
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout main composite
- actions/download-artifact main composite
- actions/upload-artifact main composite
- ubuntu latest build