[PR #1486] [CLOSED] Add Snake game in C under games/ #2089

Open
opened 2026-01-29 15:28:34 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1486
Author: @KRiSHnA88H
Created: 9/17/2025
Status: Closed

Base: masterHead: add-csnake-game


📝 Commits (4)

  • 74871c8 Add O(1) optimized solution for Project Euler Problem 6
  • ef9d5a3 Add Snake game implementation in C
  • 48547c5 Rename o(1)sol.c to o(1)_sol.c
  • 8d55ae9 Rename csnake.c to c_snake.c

📊 Changes

2 files changed (+268 additions, -0 deletions)

View changed files

games/c_snake.c (+230 -0)
project_euler/problem_6/o(1)_sol.c (+38 -0)

📄 Description

Description of Change

Added a Snake game implementation in C under the games/ folder.

  • Fully playable game in the terminal.
  • Implements movement, food spawning, growth, and game-over conditions.
  • Uses simple board rendering with characters (#, O, *) for clarity.
  • Includes comments and modular functions for readability and learning purposes.

References

  • Inspired by the classic Snake arcade game.
  • No direct duplicate found in games/.

Checklist

  • Added description of change
  • File name matches File name guidelines
  • Added example usage (main() with play loop)
  • Relevant documentation/comments added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Added file games/csnake.c with playable Snake game implementation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1486 **Author:** [@KRiSHnA88H](https://github.com/KRiSHnA88H) **Created:** 9/17/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `add-csnake-game` --- ### 📝 Commits (4) - [`74871c8`](https://github.com/TheAlgorithms/C/commit/74871c85e95fe22707d0b34c4bf8bf5791f65cbd) Add O(1) optimized solution for Project Euler Problem 6 - [`ef9d5a3`](https://github.com/TheAlgorithms/C/commit/ef9d5a325de6d37dc839239a49070ca7fe06b556) Add Snake game implementation in C - [`48547c5`](https://github.com/TheAlgorithms/C/commit/48547c5a9ae9eb9bda951b43ad3c623981d9c0f2) Rename o(1)sol.c to o(1)_sol.c - [`8d55ae9`](https://github.com/TheAlgorithms/C/commit/8d55ae9b1c2adfe1ce7f622208de346e8269a2d4) Rename csnake.c to c_snake.c ### 📊 Changes **2 files changed** (+268 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `games/c_snake.c` (+230 -0) ➕ `project_euler/problem_6/o(1)_sol.c` (+38 -0) </details> ### 📄 Description #### Description of Change Added a **Snake game implementation in C** under the `games/` folder. - Fully playable game in the terminal. - Implements movement, food spawning, growth, and game-over conditions. - Uses simple board rendering with characters (`#`, `O`, `*`) for clarity. - Includes comments and modular functions for readability and learning purposes. #### References - Inspired by the classic Snake arcade game. - No direct duplicate found in `games/`. #### Checklist - [x] Added description of change - [x] File name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [x] Added example usage (`main()` with play loop) - [x] Relevant documentation/comments added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate - [x] I acknowledge that all my contributions will be made under the project's license. Notes: Added file `games/csnake.c` with playable Snake game implementation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:28:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2089