Skip to main content

Game engine for the game Wordle

Project description

PyWordle

build status

Game Engine for the popular Wordle game.

Installing the package

To install the package, run

python setup.py install

Usage

This package provides two classes: Wordle and Game. The Wordle class allows you to provide a set of possible solutions from which a game can be created. The Game class represents a single game with a specific solution. You are allowed six guesses to solve the game. Here is a quick example of how you might interact with the game:

wordle = Wordle(WORD_LIST)
game = wordle.create_game()
game.guess("SPILL")
print(str(game))

Interactive example

An interactive example is provided to demonstrate how this library can be used to run a text based version of the classic Wordle game. The following command will run this example:

python examples/interactive.py

Package structure

py-wordle
├── LICENSE
├── README.md
├── TODO.md
├── docs
│   ├── design-spec.md
│   └── functional-spec.md
├── examples
│   ├── interactive.py
│   ├── simple.py
│   └── solutions.py
├── pywordle
│   ├── __init__.py
│   ├── game.py
│   ├── test_game.py
│   ├── test_wordle.py
│   ├── wordle.py
│   └── words.py
└── setup.py

Continuous integration

GitHub Actions is set up to run all the unit tests anytime a commit is made to this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywordle2-0.0.0.5.tar.gz (1.0 MB view hashes)

Uploaded Source

Built Distribution

pywordle2-0.0.0.5-py3-none-any.whl (52.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page