{"id":27275236,"url":"https://github.com/datslim/tetris-c","last_synced_at":"2026-02-19T07:01:45.948Z","repository":{"id":285424056,"uuid":"958081991","full_name":"datslim/tetris-c","owner":"datslim","description":"A classic Tetris implementation in C designed to run in the terminal.","archived":false,"fork":false,"pushed_at":"2025-03-31T17:29:03.000Z","size":79,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T23:32:52.529Z","etag":null,"topics":["c","cli","game","terminal","tetris"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datslim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-31T16:02:03.000Z","updated_at":"2025-04-12T11:01:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"868ac4c3-8cdf-4cf2-8e61-342584671c24","html_url":"https://github.com/datslim/tetris-c","commit_stats":null,"previous_names":["datslim/tetris-c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datslim/tetris-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datslim%2Ftetris-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datslim%2Ftetris-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datslim%2Ftetris-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datslim%2Ftetris-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datslim","download_url":"https://codeload.github.com/datslim/tetris-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datslim%2Ftetris-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cli","game","terminal","tetris"],"created_at":"2025-04-11T15:47:58.855Z","updated_at":"2026-02-19T07:01:45.928Z","avatar_url":"https://github.com/datslim.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris in C\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)  \n[![Testing](https://img.shields.io/badge/Testing-Check-green)](https://libcheck.github.io/check/)   \n[![Coverage](https://img.shields.io/badge/Coverage-gcov/lcov-blue)](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html)  \n[![Docs](https://img.shields.io/badge/Docs-Doxygen-blueviolet)](https://www.doxygen.nl/)  \n\nA classic Tetris implementation in **C** with code coverage analysis, unit tests, and full documentation.\n\n![Gameplay Screenshot](doxygen/images/game_screenshot.png)\n## Table of Contents\n- [✨ Features](#-features)\n- [🛠️ Installation](#️-installation)\n  - [🧰 Dependencies](#-dependencies)\n  - [🐧🍎 Linux/macOS](#-linuxmacos)\n- [🗂️ Project Structure](#️-project-structure)\n- [🧪 Testing](#-testing)\n- [📊 Code Coverage](#-code-coverage)\n- [📚 Documentation](#-documentation)\n- [🕹️ Keyboard Controls](#️-keyboard-controls)\n- [🔄 Development Workflow](#-development-workflow)\n- [🤝 Contributing](#-contributing)\n- [📜 License](#-license)\n\n## ✨ Features\n\n- 🎮 **Classic Tetris mechanics** (rotation, movement, hard drop)\n- 📈 **Score \u0026 level system** (higher score = higher level)\n- ⏱ **Dynamic difficulty** (speed increases with levels)\n- 🧪 **Unit tests** (powered by [Check](https://libcheck.github.io/check/))\n- 📊 **Code coverage** (generated with [gcov/lcov](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html))\n- 📚 **Documentation** (generated with [Doxygen](https://www.doxygen.nl/))\n\n\n## 🛠️ Installation\n```bash\n# Install the game \nmake install\n```\n\n### 🧰 Dependencies\n\n- C compiler (GCC)\n- NCurses\n- *Optional*:\n  - `check` (for unit tests)\n  - `doxygen` (for documentation)\n  - `graphviz` (for Doxygen diagrams)\n  - `gcov\\lcov` (for code coverage)\n\n### 🐧🍎 Linux/macOS\n\n```bash\n# Install dependencies (Debian/Ubuntu)\nsudo apt-get install libncurses5-dev libncursesw5-dev check graphviz lcov gcovr\n```\n```bash\n# Compile \u0026 run\nmake\n```\n## 🗂️ Project Structure\n```\ntetris-c/  \n├── brick_game/      # Source files for backend  \n├── tests/           # Unit tests  \n├── gcov/            # Test coverage data (autogenerated via Makefile)\n├── doxygen/         # Files for generating documentation  \n├── doxygen_files/   # Generated documentation (autogenerated via Makefile)\n├── build/           # Folder for compiled game and tests files (autogenerated via Makefile)\n├── gui/             # Source files for frontend  \n├── unit_tests/      # Unit-tests for backend  \n├── main.c           # Entry point for the game   \n└── Makefile         # Build configuration  \n```\n\n## 🧪 Testing\nProject includes unit tests using the Check framework:\n```bash\n# Build and run tests\nmake test\n```\n\n## 📊 Code coverage\nProject includes code coverage test using the GCOV\\LCOV:\n```bash\n# Generate and open coverage report\nmake gcov_report\n```\n\n## 📚 Documentation\nGenerate HTML/LaTeX docs via Doxygen:\n```bash\n# Generate  and open documentation\nmake dvi\n```\n## 🕹️ Keyboard Controls\n\n- ***← →***: Move left\\right\n- **↓**: Instant drop (hard drop)\n- **↵**: Rotate piece\n- **P**: Pause game\n- **Q**: Quit to menu\n- **R**: Restart game\n\n## 🔄 Development Workflow\n\n1. Write code in ```brick_game/```\n2. Add tests in ```unit_tests/```\n3. Check coverage\n    ```bash\n    make gcov_report\n    ```\n4. Ensure coverage doesn't drop below 80% \n\n## 🤝 Contributing\n1. Fork the repository\n\n2. Create your feature branch (```git checkout -b feature/fooBar```)\n\n3. Commit your changes (```git commit -am 'Add some fooBar'```)\n\n4. Push to the branch (```git push origin feature/fooBar```)\n\n5. Create a new Pull Request\n\n## 📜 License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n\n🎯 Enjoy the game! If you find this project useful, please consider giving it a ⭐!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatslim%2Ftetris-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatslim%2Ftetris-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatslim%2Ftetris-c/lists"}