Skip to main content

A package for auto-generating the possible combinations of a boggle grid.

Project description

made-with-python GitHub license boggle_test Actions Status

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


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-1.1.tar.gz (167.0 kB view hashes)

Uploaded Source

Built Distribution

boggle_solver-1.1-py3-none-any.whl (165.5 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