{"id":33242409,"url":"https://github.com/ky-cx/snakegame","last_synced_at":"2025-11-16T20:02:01.946Z","repository":{"id":323888721,"uuid":"1095112529","full_name":"ky-cx/SnakeGame","owner":"ky-cx","description":"Classic Snake game built with C# for cross-platform console. Demonstrates OOP principles, game loops, collision detection, and clean code architecture. Perfect portfolio project for technical interviews.","archived":false,"fork":false,"pushed_at":"2025-11-12T16:17:35.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-12T18:08:59.820Z","etag":null,"topics":["csharp","dotnet","game-development","oop","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ky-cx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-12T15:55:30.000Z","updated_at":"2025-11-12T16:17:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ky-cx/SnakeGame","commit_stats":null,"previous_names":["ky-cx/snakegame"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ky-cx/SnakeGame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ky-cx%2FSnakeGame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ky-cx%2FSnakeGame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ky-cx%2FSnakeGame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ky-cx%2FSnakeGame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ky-cx","download_url":"https://codeload.github.com/ky-cx/SnakeGame/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ky-cx%2FSnakeGame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284767947,"owners_count":27060132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["csharp","dotnet","game-development","oop","snake-game"],"created_at":"2025-11-16T20:01:23.395Z","updated_at":"2025-11-16T20:02:01.940Z","avatar_url":"https://github.com/ky-cx.png","language":"C#","readme":"# 🐍 Snake Game - C# Console Application\n\n[![Made with C#](https://img.shields.io/badge/Made%20with-C%23-239120?style=for-the-badge\u0026logo=c-sharp)](https://github.com/ky-cx/snake-game-csharp)\n[![.NET](https://img.shields.io/badge/.NET-10.0-512BD4?style=for-the-badge\u0026logo=dotnet)](https://dotnet.microsoft.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Cross--Platform-blue?style=for-the-badge)]()\n\nClassic Snake game built with C# for the terminal, demonstrating OOP principles, game loops, and collision detection algorithms.\n\n\n## ✨ Features\n\n- 🎮 Classic snake gameplay with smooth controls\n- 🎯 Score tracking system\n- ⚡ Progressive difficulty (speed increases)\n- ⏸️ Pause functionality\n- 🎨 Clean ASCII art interface\n- 📊 Real-time stats display\n\n## 🛠️ Technologies\n\n- **Language**: C# 10.0\n- **Framework**: .NET 10.0\n- **Platform**: Cross-platform (Windows, macOS, Linux)\n\n## 🚀 Getting Started\n\n### Prerequisites\n- .NET 10.0 SDK or later\n\n### Installation \u0026 Running\n```bash\n# Clone the repository\ngit clone https://github.com/ky-cx/snake-game-csharp.git\n\n# Navigate to project directory\ncd snake-game-csharp\n\n# Run the game\ndotnet run\n```\n\n## 🎮 How to Play\n\n### Controls\n- **W / ↑** - Move Up\n- **S / ↓** - Move Down\n- **A / ←** - Move Left\n- **D / →** - Move Right\n- **P** - Pause/Resume\n- **Q** - Quit\n\n### Rules\n1. Control the snake to eat food (★)\n2. Each food increases score by 10 points\n3. Snake grows with each food eaten\n4. Speed increases every 50 points\n5. Avoid hitting walls or yourself!\n\n## 🎯 Technical Highlights\n\n### Object-Oriented Design\n- Encapsulation of game state and logic\n- Type-safe direction handling with enums\n- Clean separation of concerns\n\n### Key Algorithms\n- **Collision Detection**: O(n) self-collision, O(1) boundary checks\n- **Game Loop**: Event-driven with fixed time steps\n- **Snake Movement**: Deque-like operations using List\u003cT\u003e\n\n### Code Quality\n- Comprehensive XML documentation\n- SOLID principles applied\n- Clean, maintainable code structure\n\n## 📊 Project Stats\n\n- **Lines of Code**: ~400\n- **Development Time**: ~6 hours\n- **Complexity**: Medium (junior-mid level)\n\n## 💼 Why This Project?\n\nThis project demonstrates several key software engineering concepts:\n\n- **OOP Principles**: Encapsulation, abstraction, separation of concerns\n- **Algorithm Skills**: Collision detection, state management\n- **Game Development**: Game loop, real-time input handling\n- **Code Quality**: Documentation, naming conventions, clean code\n\nPerfect for technical interviews to discuss:\n- Design patterns and architecture\n- Performance optimization strategies\n- Testing approaches\n- Potential enhancements\n\n## 🔮 Future Enhancements\n\n- [ ] High score persistence\n- [ ] Multiple difficulty levels\n- [ ] Sound effects\n- [ ] Multiplayer mode\n- [ ] Power-ups and obstacles\n\n## 👨‍💻 Author\n\n**Conghui Xu**\n- 📧 Email: hsuconghui@gmail.com\n- 💼 LinkedIn: [linkedin.com/in/cx27](https://linkedin.com/in/cx27)\n- 🐙 GitHub: [@ky-cx](https://github.com/ky-cx)\n- 🌐 Portfolio: [ky-cx.github.io](https://ky-cx.github.io)\n\n## 📄 License\n\nThis project is open source and available under the MIT License.\n\n---\n\n**Built with 💚 by Conghui Xu**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fky-cx%2Fsnakegame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fky-cx%2Fsnakegame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fky-cx%2Fsnakegame/lists"}