Word Detective is an interactive and engaging word-guessing game. Built with Python, HTML, and CSS, it offers an immersive experience for word enthusiasts. Whether you want to test your vocabulary, add new words to the database, or explore existing ones, Word Detective has it all with a sleek and responsive interface.
Word Detective is more than just a word-guessing gameโit's a fun and educational challenge for word enthusiasts of all ages. Combining the thrill of solving puzzles with the joy of expanding your vocabulary, it offers a dynamic and interactive experience. Whether you're competing for the top spot on the leaderboard or contributing new words to the growing database, Word Detective ensures hours of entertainment while sharpening your linguistic skills.
Its responsive design and support for both light and dark themes make it accessible and visually appealing across all devices.
- ๐ฎ Word Guessing Game: Solve word puzzles based on unique hints.
- ๐ Add New Words: Expand the database with custom words and descriptions.
- ๐ Preview Data: View and manage the word database effortlessly.
- ๐ Leaderboard: Track and compare your scores with other players.
- ๐ Dark Mode Support: Switch between light and dark themes for a comfortable experience.
- ๐ก Interactive UI: Fully responsive design for seamless usage across devices.
This project leverages modern technologies to deliver a smooth and efficient experience:
- HTML: For building the structure of the user interface.
- CSS: To style and ensure responsiveness.
- Python: Handles backend logic and data management.
Get started with Word Detective in just a few steps:
-
Clone the repository:
git clone https://github.com/hrosicka/WordDetective.git
-
Navigate to the project directory:
cd WordDetective
-
Run the application:
python app.py
-
Open your browser and navigate to:
http://localhost:5000
- Launch the game and start guessing words based on the provided hints.
- Head over to the "Add New Word" section to contribute to the word database.
- Explore and manage the database from the "Preview Data" section.
- Check how you rank among other players by visiting the Leaderboard.
- Use the toggle button to switch between light and dark themes.
Word Detective includes automated tests to ensure robustness and reliability. The tests are implemented using unittest and Selenium.
python -m unittest discover -s unit-tests -p "*.py"
WordDetective/
โโโ routes/ # Backend logic for the game's core functionality
โ โโโ game_logic.py # Handles the core game logic
โ โโโ game.py # Manages the game state
โ โโโ player.py # Handles player-related operations
โ โโโ score.py # Manages scoring and leaderboard logic
โ โโโ word.py # Handles word-related operations
โ
โโโ static/ # Static files for styling and assets
โ โโโ style.css # Main stylesheet for the application
โ
โโโ templates/ # HTML templates for the web interface
โ โโโ index.html # Main game interface
โ โโโ add_word.html # Interface for adding new words
โ โโโ change_name.html # Page for changing player names
โ โโโ error.html # Error handling page
โ โโโ leaderboard.html # Leaderboard display
โ โโโ preview.html # Page for previewing database content
โ
โโโ tests/ # Automated tests for the application
โ โโโ test_player.py # Test cases for player-related operations
โ โโโ test_game_logic.py # Test cases for game logic
โ โโโ test_word.py # Test cases for word operations
โ
โโโ unit-tests/ # Folder for additional unit testing scripts
โ โโโ test_player.py # Test cases for player operations
โ
โโโ app.py # Main application entry point
โโโ requirements.txt # Dependencies required to run the project
โโโ README.md # Project documentation
routes/: Contains the backend logic responsible for gameplay, scoring, and word management.
static/: Stores the CSS styling to ensure a visually appealing and responsive design.
templates/: Houses all HTML templates, enabling a dynamic and customizable user interface.
tests/: Includes automated test cases for validating the application's core functionalities.
unit-tests/: Contains additional unit tests.
app.py: The central file that integrates different components and runs the application.
- Launch the application by running the command:
python app.py
- Open your browser and navigate to http://localhost:5000.
- Guess the word based on the provided hint and submit your answer.
- Points will be awarded for correct guesses.
- Navigate to the "Change Player" section.
- Enter your desired player name and save it.
- Your name will now appear in the game interface.
- Each word has a unique hint to help you guess.
- You can make multiple attempts until you guess the correct word.
- Points are calculated based on the number of attempts taken.
- Check the leaderboard to compare your scores with others.
- Go to the "Add New Word" section.
- Enter the new word and its corresponding hint.
- Submit the word to add it to the game database.
- Explore the "Preview Data" section to view the existing word list.
- Update or delete words as needed (if this functionality is supported).
- View the top players and their scores in a ranked list.
- Automatically update scores as you play.
- Navigate back to the game with a single click.
- Use the "Toggle Dark Mode" button in the interface to switch between light and dark themes.
- The theme preference will apply across the application.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for checking out Word Detective! Whether you're here to guess words, expand your vocabulary, or just procrastinate in style, we hope you enjoy the experience. And remember: if you can't guess the word, it's not youโit's the dictionary's fault. ๐
Happy guessing, and may the words be ever in your favor! ๐ต๏ธโโ๏ธโจ