This is a fun and interactive Rock Paper Scissors game built using Streamlit. Challenge the computer, track your scores, and see if you can become the ultimate champion! The game features a user-friendly interface, dynamic visuals, and real-time score tracking.
- Interactive Gameplay: Choose between Rock, Paper, or Scissors and see if you can beat the computer.
- Real-Time Results: Displays your choice, the computer's choice, and whether you win, lose, or tie.
- Score Tracking: Keeps track of wins, losses, and ties across multiple rounds.
- Dynamic Visuals: Images and animations enhance the gameplay experience.
- Streamlit Integration: Built with Streamlit for a seamless web-based experience.
To run this project locally, ensure you have the following installed:
- Python 3.7 or higher
- Streamlit library
Install the required dependencies using pip:
pip install streamlitFollow these steps to play the game locally:
- Clone this repository to your local machine:
git clone https://github.com/apurvafx/rock-paper-scissors-game.git- Navigate to the project directory:
cd rock-paper-scissors-game- Run the Streamlit app:
streamlit run app.py- Open the link provided in your terminal (usually
http://localhost:8501) to play the game in your browser.
- Select your choice (Rock ✊, Paper ✋, or Scissors ✌️) using the radio buttons.
- Click on the "Play" button to challenge the computer.
- Watch as the computer makes its choice and see who wins!
- Track your scores (Wins, Losses, Ties) displayed at the bottom of the page.
rock-paper-scissors-game/
├── app.py # Main application code
├── rock.png # Image for Rock
├── paper.png # Image for Paper
├── scissors.png # Image for Scissors
├── winner.gif # Animation for winning
├── loser.gif # Animation for losing
├── tie.gif # Animation for tie
└── README.md # Documentation fileEnsure that all image and GIF files are placed in the same directory as app.py.
-
Streamlit Not Installed:
- Ensure you’ve installed Streamlit using
pip install streamlit.
- Ensure you’ve installed Streamlit using
-
Images Not Displaying:
- Verify that all image files (
rock.png,paper.png,scissors.png, etc.) are in the same directory asapp.py.
- Verify that all image files (
-
App Not Running:
- Check if Python is installed correctly and ensure you're running Streamlit with Python 3.x.
-
Browser Issues:
- If the app doesn’t open automatically, manually navigate to
http://localhost:8501in your browser.
- If the app doesn’t open automatically, manually navigate to
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as needed.
- Streamlit: For providing an amazing framework for building web applications.
- Icons/Images: Thanks to free resources for providing high-quality images and animations.
This repository is indexed and documented by DeepWiki, an AI-powered platform that provides interactive code exploration and detailed documentation.
Explore the system architecture, game logic, user interface, and state management with helpful explanations and diagrams generated automatically.
Check it out for a deeper understanding of the codebase and to get instant answers about this project!
Made with ❤️ using Streamlit