This project is a web-based guessing game where players try to guess the name of a Minecraft block based on hints provided. The game is built using Flask for the backend and HTML/CSS/JavaScript for the frontend.
- Randomly selects a Minecraft block and provides an initial hint.
- Allows users to guess the block name.
- Provides additional hints upon request.
- Displays a dropdown of block names for easier guessing.
-
Clone the repository:
https://github.com/afnantime/minecraft-guessing.git cd minecraft-guessing-game
-
Install dependencies:
pip install flask
-
Run the application:
python app.py
-
Open your browser and navigate to:
http://127.0.0.1:5000/
app.py
: Main Flask application.static/blocks.json
: JSON file containing block data and hints.templates/index.html
: HTML template for the game interface.static/img/
: Directory containing images of Minecraft blocks.
GET /
: Renders the main game page.POST /guess
: Checks the user's guess.POST /get_hint
: Provides an additional hint.
[
{
"name": "Redstone Block",
"image": "static/img/Block_of_Redstone.webp",
"hints": [
"A block that pulses with energy, powering contraptions far and wide.",
"The lifeblood of machinery and automation, glowing with potential."
]
},
...
]
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.