The Snake, Water, Gun game implemented in Python allows a user to play against the computer. It's a simple hand game where choices (Snake, Water, Gun) determine the outcome based on predefined rules.
This project requires Python 3.12.1 or later. To set up the project:
-
Ensure Python 3.12.1 or a later version is installed on your system. You can download Python from python.org.
-
Clone or download the repository to your local machine.
git clone https://github.com/jaiswalchitransh/Snake-Water-Gun-Game-in-Python.git
-
Open the project in your preferred Python environment (e.g., IDE or terminal).
-
Run the script (
game.py
) and observe the output.
Run the script:
python game.py
Follow the prompts to enter your choice (0 for Snake, 1 for Water, 2 for Gun) when prompted.
- Random Selection: The computer randomly selects its choice (Snake, Water, Gun).
- Outcome Determination: The game function compares the user's choice against the computer's choice and determines if the user won, lost, or it's a draw.
- Score Representation: Returns 0 for a draw, -1 for a loss, and 1 for a win.
- User Interaction: Provides clear feedback on the user's choice, the computer's choice, and the game result.
I, Chitransh Jaiswal developed this Project Individually. I was responsible for all aspects of the project, including design, development, testing, and documentation. Contributions to improve the efficiency, readability, or functionality of the code are welcome. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.
Please ensure your contributions adhere to the coding standards and follow the existing style and structure.
Thank you for your interest in the Snake, Water, Gun Game!