https://github.com/shivankushsingh09/snake-water-gun-game
Snake, Water, Gun" is a C command-line game where players face off against the computer. Choices—Snake, Water, or Gun—are compared: Snake beats Water, Water beats Gun, and Gun beats Snake. It boosts programming skills with logic, input handling, random numbers, and conditionals.
https://github.com/shivankushsingh09/snake-water-gun-game
basic-game-logic c-language-project c-programming console-game game-design game-development simple-game text-based-game
Last synced: 2 months ago
JSON representation
Snake, Water, Gun" is a C command-line game where players face off against the computer. Choices—Snake, Water, or Gun—are compared: Snake beats Water, Water beats Gun, and Gun beats Snake. It boosts programming skills with logic, input handling, random numbers, and conditionals.
- Host: GitHub
- URL: https://github.com/shivankushsingh09/snake-water-gun-game
- Owner: shivankushsingh09
- License: mit
- Created: 2024-07-18T16:24:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-26T04:06:47.000Z (9 months ago)
- Last Synced: 2025-01-16T07:55:39.222Z (4 months ago)
- Topics: basic-game-logic, c-language-project, c-programming, console-game, game-design, game-development, simple-game, text-based-game
- Language: C
- Homepage: https://www.w3schools.com/c/
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.md
Awesome Lists containing this project
README
## Introduction
The Snake Water Gun Game is a simple implementation of the classic game using the C programming language. This project demonstrates basic game mechanics, user input handling, and game logic.
### Features
- Classic Game Mechanics: Implements the Snake Water Gun game rules.
- User Input: Allows players to input their choices for the game.
- Score Tracking: Keeps track of the score for each round.
- Game Over Condition: Ends the game when certain conditions are met.### Requirements
- Compiler: GCC (GNU Compiler Collection) or any compatible C compiler.
- Operating System: The game should run on any system that supports C compilation, including Windows, macOS, and Linux.### Installation
1. **Clone the Repository:**
```bash
git clone https://github.com/shivankushsingh09/Snake-Water-Gun-Game.git
```2. **Navigate to the Project Directory:**
```bash
cd Snake-Water-Gun-Game
```3. **Compile the Code:**
```bash
gcc -o Snake-Water-Gun-Game main.c
```4. **Run the Game:**
```bash
./Snake-Water-Gun-Game
```### How to Play
1. Start the Game:
- Execute the compiled binary to start the game.
2. Input Choices:
- Enter your choice (Snake, Water, or Gun) when prompted.
- The game will display the computer's choice and the result of the round.3. Winning and Losing:
- The game will display your score and the computer's score.
- The game continues until the predefined number of rounds is completed.### Code Structure
- main.c: Contains the main logic of the game, including game loop, input handling, and score management.
### Contributing
1. Fork the Repository:
Click on the "Fork" button on GitHub to create a copy of this repository under your account.2. **Create a New Branch:**
```bash
git checkout -b feature/new-feature
```3. **Make Changes and Commit:**
```bash
git add .
git commit -m "Add new feature"
```4. **Push to Your Fork:**
```bash
git push origin feature/new-feature
```5. Open a Pull Request:
Go to the original repository and open a pull request with your changes.### License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/shivankushsingh09/Snake-Water-Gun-Game?tab=MIT-1-ov-file) file for details.
### Acknowledgments
- Thanks to the C programming community for providing resources and support.
- Special thanks to anyone who contributed to the project.