Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaiswalchitransh/snake-water-gun-game-in-python
This Python script implements a Snake, Water, Gun game where the user competes against the computer. The user inputs their choice, and the program randomly selects a choice for the computer. The game function evaluates the choices, determining the winner based on predefined rules.
https://github.com/jaiswalchitransh/snake-water-gun-game-in-python
game game-development project python python-3 python3 snakewatergun-game
Last synced: 24 days ago
JSON representation
This Python script implements a Snake, Water, Gun game where the user competes against the computer. The user inputs their choice, and the program randomly selects a choice for the computer. The game function evaluates the choices, determining the winner based on predefined rules.
- Host: GitHub
- URL: https://github.com/jaiswalchitransh/snake-water-gun-game-in-python
- Owner: jaiswalchitransh
- Created: 2024-01-31T20:51:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T20:42:56.000Z (5 months ago)
- Last Synced: 2024-11-05T22:42:25.664Z (2 months ago)
- Topics: game, game-development, project, python, python-3, python3, snakewatergun-game
- Language: Python
- Homepage:
- Size: 311 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snake Water Gun Game in Python
## Table of Contents
- [Project Overview](#project-overview)
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Contribution](#contribution)## Project Overview
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.## Installation
This project requires Python 3.12.1 or later.
To set up the project:
1. Ensure Python 3.12.1 or a later version is installed on your system. You can download Python from [python.org](https://www.python.org/downloads/).
2. Clone or download the repository to your local machine.git clone https://github.com/jaiswalchitransh/Snake-Water-Gun-Game-in-Python.git
3. Open the project in your preferred Python environment (e.g., IDE or terminal).
4. Run the script (`game.py`) and observe the output.## Usage
Run the script:python game.py
Follow the prompts to enter your choice (0 for Snake, 1 for Water, 2 for Gun) when prompted.## Features
- **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.## Contribution
I, **[Chitransh Jaiswal](https://www.linkedin.com/in/jaiswalchitransh/)** 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:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Make your changes.
4. Commit your changes (`git commit -am 'Add some feature'`).
5. Push to the branch (`git push origin feature/your-feature`).
6. 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!