{"id":18699736,"url":"https://github.com/hctilg/snake-game","last_synced_at":"2026-01-24T18:03:09.748Z","repository":{"id":248091707,"uuid":"827720769","full_name":"hctilg/snake-game","owner":"hctilg","description":"Terminal Snake game in C++ using ncurses library","archived":false,"fork":false,"pushed_at":"2024-08-22T06:16:15.000Z","size":195,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T08:18:38.852Z","etag":null,"topics":["cpp","snake-game"],"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/hctilg.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}},"created_at":"2024-07-12T08:28:29.000Z","updated_at":"2024-08-22T06:16:18.000Z","dependencies_parsed_at":"2024-08-22T07:23:07.945Z","dependency_job_id":null,"html_url":"https://github.com/hctilg/snake-game","commit_stats":null,"previous_names":["hctilg/snake-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hctilg/snake-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hctilg%2Fsnake-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hctilg%2Fsnake-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hctilg%2Fsnake-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hctilg%2Fsnake-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hctilg","download_url":"https://codeload.github.com/hctilg/snake-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hctilg%2Fsnake-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28733349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T17:51:25.893Z","status":"ssl_error","status_checked_at":"2026-01-24T17:50:48.377Z","response_time":89,"last_error":"SSL_read: 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":["cpp","snake-game"],"created_at":"2024-11-07T11:34:16.161Z","updated_at":"2026-01-24T18:03:09.730Z","avatar_url":"https://github.com/hctilg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snake Game\n\nSimple terminal Snake game in C++ using ncurses library. Mostly to learn/practice C++, and learn to use ncurses.\n\n## CLI \n\n### Build Instructions\nCompile the game using the following command:\n```bash\ng++ snake.cpp -lncurses -o snake\n```\n\n### Play game \n```bash\n./snake\n```\n\n### Game Preview\n![](images/cli.jpg)\n\n## GUI\n\n### Features\n* **Snake Movement:** Control the snake using arrow keys or WASD keys.\n* **Food:** Randomly generated food appears on the screen. Snake grows longer upon eating food, increasing the score.\n* **Collision Detection:** Game ends if the snake collides with the walls or its own body.\n* **Game Over:** Displayed with a \"Game Over!\" message and an option to restart by pressing Enter.\n \n### Prerequisites\n\nBefore running the game, ensure you have SFML installed. You can install SFML on Linux using:\n \n```\nsudo apt-get install libsfml-dev\n```\n \n### Build Instructions\nCompile the game using the following command:\n \n```\ng++ snake_game.cpp -o snake-game -lsfml-graphics -lsfml-window -lsfml-system\n```\n \n### How to Play\n1. **Controls:**\n \n* Use arrow keys (Up, Down, Left, Right) or WASD keys to control the snake's direction.\n* Press Enter to restart the game when prompted after Game Over.\n \n2. **Objective:**\n \n* Eat food to grow the snake and earn points.\n* Avoid colliding with walls or the snake's own body.\n \n3. **Game Over:**\n \n* The game ends when the snake collides with a wall or itself.\n* A \"Game Over!\" message is displayed along with an option to restart the game.\n \n### Game Preview\n\n**Starting the game:**\n \n![](images/gui-gamestart.png)\n \n**Game Over:**\n \n![](images/gui-gameover.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhctilg%2Fsnake-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhctilg%2Fsnake-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhctilg%2Fsnake-game/lists"}