Skip to content

Guess the hidden word in as few tries as possiblešŸ’” Check out the screenshots and GIFs in the README file to get a sneak peek of the game.

Notifications You must be signed in to change notification settings

dawidkaplon/WordGuesser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

60 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

WordGuesser

Description

The Classic Wordle Challenge

In WordGuesser, you'll be presented with a secret word that you need to guess correctly within a limited number of attempts. Each time you guess a letter, you'll receive feedback on whether the letter is in the word and if it's in the correct position. Use this feedback to strategically deduce the hidden word.

Web Scraper Feature

One of the standout features of WordGuesser is its built-in web scraper. The web scraper roams various websites, collecting a treasure trove of words and their definitions. It enriches the game by providing you with not just a list of words but also their meanings. This feature not only enhances your gameplay but also offers a valuable learning experience.

Multi-language

The game allows the User to instantly change the language between Polish and English. Words are also drawn in the Player's chosen language.

Getting Started

These instructions will help you set up and run the project on your local machine.

Prerequisites

  • Python installed
  • Docker (if you plan to use Docker)

Installation

1. Clone the repo:

git clone https://github.com/dawidkaplon/WordGuesser.git
cd WordGuesser

2. Create a virtual environment & activate it:

python -m venv venv
venv\Scripts\activate

3. Install project dependencies from requirements.txt:

pip install -r requirements.txt

4. Set the Secret Key

In order to run the local server, You have to set new Secret Key in settings.py file.

  • Access the Python Interactive Shell:
    python manage.py shell
  • Import the get_random_secret_key function:
    from django.core.management.utils import get_random_secret_key
  • Generate the Secret Key in the Terminal using the get_random_secret_key() function:
    >>> get_random_secret_key()
    'qw^9ej(l4vq%d_06xig$vw+b(-@#00@8l7jlv77=sq5r_sf3nu'
  • Copy and Paste the Key into your SECRET_KEY variable in the settings.py:
    SECRET_KEY = 'qw^9ej(l4vq%d_06xig$vw+b(-@#00@8l7jlv77=sq5r_sf3nu'

5. Exit the shell using exit() and then make necessary migrations:

python manage.py makemigrations
python manage.py migrate

6. Run the local server:

python manage.py runserver

Now You should be able to get some response using localhost:8000

Running tests

Run unit tests with:

python manage.py test

Docker operations

To run the commands below, you need to be in directory where the Dockerfile is located

  1. Build the image locally with the following command:
docker build -t wordguesser .
  1. Run the Docker container:
docker run -p 8000:8000 wordguesser

Game sneak peek:

  • Quality can be poor due to GIF compression
  • For better view please check the screenshots below


  • Main gameplay

WebsitePreview

  • Start of the game

WebsitePreview2

  • The mid-game

WebsitePreview3

  • Index page (English language)

WebsitePreview4

  • Index page (Polish language)

WebsitePreview5

  • Navbar extended

WebsitePreview6

  • Single User's statistics

WebsitePreview7

  • Single User's drawn words

WebsitePreview8

  • Last words drawn by users (both authenticated and not authenticated). User's email data is restricted to superuser only

WebsitePreview9

  • Win page

WebsitePreview10

TO-DO:

  • Improve swagger docs
  • Secure endpoints with user authentication
  • Create custom permission classes
  • Switch to PostgreSQL database
  • Create docker migrations service
  • Change these terrible sounds or completely remove them
  • Also visual changes should be made
  • Add pre-commit hook

About

Guess the hidden word in as few tries as possiblešŸ’” Check out the screenshots and GIFs in the README file to get a sneak peek of the game.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published