Skip to content

Latest commit

 

History

History
97 lines (61 loc) · 2.42 KB

README.md

File metadata and controls

97 lines (61 loc) · 2.42 KB

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:

       git clone https://github.com/shivankushsingh09/Snake-Water-Gun-Game.git
  2. Navigate to the Project Directory:

       cd Snake-Water-Gun-Game
  3. Compile the Code:

       gcc -o Snake-Water-Gun-Game main.c
  4. Run the Game:

       ./Snake-Water-Gun-Game

How to Play

  1. Start the Game:
  • Execute the compiled binary to start the game.
  1. 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.
  1. 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:

       git checkout -b feature/new-feature
  3. Make Changes and Commit:

       git add .
       git commit -m "Add new feature"
  4. Push to Your Fork:

       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 file for details.

Acknowledgments

  • Thanks to the C programming community for providing resources and support.
  • Special thanks to anyone who contributed to the project.