Skip to main content

Python-based package that allows you to solve any N x M Boggle board.

Project description

logo

Pyggle

made-with-python GitHub license

GitHub: https://github.com/andrearcaina/pyggle

PyPi: https://pypi.org/project/pyggle/

Find all possible words given a board and words, with a visual representation of the algorithm! Check lib/docs for package details. For an example on how to use pyggle, check lib/examples/example.py!

Installation

pip install pyggle

Usage

Input is case sensitive (for the board).

The input would consist of: an N x M board as a string with rows separated by spaces. Alternatively, you can pass in a list of lists where each element is the character on the board.

If words is not passed as an argument, it will utilize a text file that consists of 479k words.

If official is not given as a boolean argument, find all words regardless of length, and the letter 'Q' is not represented as 'Qu'. If official is passed as a boolean argument, then the algorithm follows the official rules of boggle. Pyggle will solve and:

  • find all words that have a length greater than 3.
  • The letter 'Q' is now represented as 'Qu'.
from pyggle import Boggle

board = "ea st"

boggle = Boggle(board)

boggle.print_result()

For more functions from pyggle, check:

Output

I don't know how "ae" or "aes" or "ast" is a word, but w/e :P

a: [(0, 1)]
ae: [(0, 1), (0, 0)]
aes: [(0, 1), (0, 0), (1, 0)]
aet: [(0, 1), (0, 0), (1, 1)]
as: [(0, 1), (1, 0)]
ase: [(0, 1), (1, 0), (0, 0)]
ast: [(0, 1), (1, 0), (1, 1)]
at: [(0, 1), (1, 1)]
ate: [(0, 1), (1, 1), (0, 0)]
ates: [(0, 1), (1, 1), (0, 0), (1, 0)]
e: [(0, 0)]
ea: [(0, 0), (0, 1)]
east: [(0, 0), (0, 1), (1, 0), (1, 1)]
eat: [(0, 0), (0, 1), (1, 1)]
eats: [(0, 0), (0, 1), (1, 1), (1, 0)]
es: [(0, 0), (1, 0)]
est: [(0, 0), (1, 0), (1, 1)]
et: [(0, 0), (1, 1)]
eta: [(0, 0), (1, 1), (0, 1)]
etas: [(0, 0), (1, 1), (0, 1), (1, 0)]
s: [(1, 0)]
sa: [(1, 0), (0, 1)]
sae: [(1, 0), (0, 1), (0, 0)]
sat: [(1, 0), (0, 1), (1, 1)]
sate: [(1, 0), (0, 1), (1, 1), (0, 0)]
se: [(1, 0), (0, 0)]
sea: [(1, 0), (0, 0), (0, 1)]
seat: [(1, 0), (0, 0), (0, 1), (1, 1)]
set: [(1, 0), (0, 0), (1, 1)]
seta: [(1, 0), (0, 0), (1, 1), (0, 1)]
st: [(1, 0), (1, 1)]
sta: [(1, 0), (1, 1), (0, 1)]
t: [(1, 1)]
ta: [(1, 1), (0, 1)]
tae: [(1, 1), (0, 1), (0, 0)]
tas: [(1, 1), (0, 1), (1, 0)]
te: [(1, 1), (0, 0)]
tea: [(1, 1), (0, 0), (0, 1)]
teas: [(1, 1), (0, 0), (0, 1), (1, 0)]
ts: [(1, 1), (1, 0)]

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

pyggle-1.1.316.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyggle-1.1.316-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file pyggle-1.1.316.tar.gz.

File metadata

  • Download URL: pyggle-1.1.316.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for pyggle-1.1.316.tar.gz
Algorithm Hash digest
SHA256 0b5c1dfe2eae875d44525b1c199d34b7c12670f6f8d322df92cc0eb19003517b
MD5 d6699708ef7919d5b3ed34ab30ad1516
BLAKE2b-256 f05b6f1e6a495a46e5dfe8ec7e85282eff5c27f728ef44026637f6f91d60e193

See more details on using hashes here.

File details

Details for the file pyggle-1.1.316-py3-none-any.whl.

File metadata

  • Download URL: pyggle-1.1.316-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for pyggle-1.1.316-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc42eaba199f7fa1c1613cef31aa0d75ee49550c7204f5424b59a04deaeb56a
MD5 123d36ba7f9b95fba3ef687afafd38b5
BLAKE2b-256 7134443ba84e0cccd1dbd45ae1c430c741f2960e56a5fc56b9e15fae2a798da5

See more details on using hashes here.

Supported by

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