A package for auto-generating the possible combinations of a boggle grid.
Project description
A recursive method for finding all words in a given square grid.
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
boggle_solver-0.20.tar.gz
(166.9 kB
view hashes)
Built Distribution
boggle_solver-0.20-py3-none-any.whl
(165.5 kB
view hashes)
Close
Hashes for boggle_solver-0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0290c0920eaa906ad4f647ccf95539eaa81b86f1ae2940263af444974fb421d |
|
MD5 | 7ca757bea91130eb70b52d882e0f81ea |
|
BLAKE2b-256 | 995efce9c78027b21cb41b56158b76614994c6c9575354508ce9416de3b8ee61 |