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.
- 🚀 Features
- 🛠️ Technologies Used
- 🖥️ Installation
- 🎮 How to Play
- 🧪 Testing
- 📁 Project structure
- User Documentation - Detailed steps
- 🏆 Leaderboard
- 👩💻 Author
- 📝 License
- 🎉 Conclusion
- 🎮 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.
Lovingly crafted by Hanka Robovska 👩🔬
This project is licensed under the MIT License. See the LICENSE file for details. Free to use, modify, and distribute as needed.
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! 🕵️♀️✨



