A package for auto-generating the possible combinations of a boggle grid.
Project description
GitHub: github.com/euanacampbell/boggle_solver
PyPi: pypi.org/project/boggle-solver
Installation
pip3 install boggle-solver
Import
from boggle_solver import *
Usage
Create a 2-dimensional array and pass this into the package.
from boggle_solver import *
grid = [
['M','A','P'],
['E','T','E'],
['D','E','N'],
]
boggle=Grid(grid)
To confirm this worked, the below function can be used.
boggle.print_grid()
['M', 'A', 'P']
['E', 'T', 'E']
['D', 'E', 'N']
Now search for all words. This will take ~20 seconds for a 3x3 grid.
words = boggle.find_all_words()
print(words[:10])
['MEAT', 'MET', 'METED', 'MEET', 'MAT', 'MATE', 'MATED', 'MAP', 'EDEN', 'EAT']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boggle_solver-1.1.tar.gz.
File metadata
- Download URL: boggle_solver-1.1.tar.gz
- Upload date:
- Size: 167.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6d2e3953e134da507c49cf770199a7b92e96a54a06cdf28b1e072da4f4c3a3
|
|
| MD5 |
8c9ef787224494f05a4bf27cf92fa079
|
|
| BLAKE2b-256 |
a7f6b160201292e21842e4a961af75137a4f63ca28c817cc756cebe19b0639b3
|
File details
Details for the file boggle_solver-1.1-py3-none-any.whl.
File metadata
- Download URL: boggle_solver-1.1-py3-none-any.whl
- Upload date:
- Size: 165.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
588d5448710fd273d08902b7316e5edfa537b571dfd11d238d6f68df2bac95ad
|
|
| MD5 |
4a6a2ad6012d8a470729f53b0e9ec2c6
|
|
| BLAKE2b-256 |
09e1c947e20fbd714d33a9a46bcebc16b9c78ae765a6c549b9a0a888710ca3db
|