Skip to content

Word Detective ๐Ÿ•ต๏ธ is a word-guessing ๐ŸŽฎ game built with Python, HTML, and CSS. Players can guess words based on hints, add new words to the database, and explore the existing word list through an interactive interface. Tests are implemented using Selenium and unittest.

License

Notifications You must be signed in to change notification settings

hrosicka/WordDetective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

94 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Word Detective ๐Ÿ•ต๏ธ

Python MIT License Last Commit Issues Selenium

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

  • ๐ŸŽฎ 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.

๐Ÿ› ๏ธ Technologies Used

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.

๐Ÿ–ฅ๏ธ Installation

Get started with Word Detective in just a few steps:

  1. Clone the repository:

    git clone https://github.com/hrosicka/WordDetective.git
  2. Navigate to the project directory:

    cd WordDetective
  3. Run the application:

    python app.py
  4. Open your browser and navigate to:

    http://localhost:5000
    

๐ŸŽฎ How to Play

๐Ÿ” Start the Game

  • Launch the game and start guessing words based on the provided hints.

โœ๏ธ Add New Words

  • Head over to the "Add New Word" section to contribute to the word database.

๐Ÿ“– Preview Data

  • Explore and manage the database from the "Preview Data" section.

๐Ÿ† View Leaderboard

  • Check how you rank among other players by visiting the Leaderboard.

๐ŸŒ— Toggle Dark Mode

  • Use the toggle button to switch between light and dark themes.

๐Ÿงช Testing

Word Detective includes automated tests to ensure robustness and reliability. The tests are implemented using unittest and Selenium.

Run tests

python -m unittest discover -s unit-tests -p "*.py"

๐Ÿ“ Project structure

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

Key Highlights:

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.


User Documentation - Detailed steps

  1. Launch the application by running the command:
python app.py
  1. Open your browser and navigate to http://localhost:5000.
  2. Guess the word based on the provided hint and submit your answer.
  3. Points will be awarded for correct guesses.

๐Ÿ‘ค Setting Up a Player

  1. Navigate to the "Change Player" section.
  2. Enter your desired player name and save it.
  3. Your name will now appear in the game interface.

๐Ÿ“œ Game Rules

  1. Each word has a unique hint to help you guess.
  2. You can make multiple attempts until you guess the correct word.
  3. Points are calculated based on the number of attempts taken.
  4. Check the leaderboard to compare your scores with others.

โœ๏ธ Adding a New Word

  1. Go to the "Add New Word" section.
  2. Enter the new word and its corresponding hint.
  3. Submit the word to add it to the game database.

๐Ÿ“‹ Managing the Word List

  1. Explore the "Preview Data" section to view the existing word list.
  2. Update or delete words as needed (if this functionality is supported).

๐Ÿ† Leaderboard

  1. View the top players and their scores in a ranked list.
  2. Automatically update scores as you play.
  3. Navigate back to the game with a single click.

๐ŸŒ— Dark Mode

  1. Use the "Toggle Dark Mode" button in the interface to switch between light and dark themes.
  2. The theme preference will apply across the application.


๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


๐ŸŽ‰ Conclusion

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! ๐Ÿ•ต๏ธโ€โ™€๏ธโœจ

About

Word Detective ๐Ÿ•ต๏ธ is a word-guessing ๐ŸŽฎ game built with Python, HTML, and CSS. Players can guess words based on hints, add new words to the database, and explore the existing word list through an interactive interface. Tests are implemented using Selenium and unittest.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published