Boggle
This project generates boards for the game boggle.
Installation
This package can be installed using pip.
pip install boggle
Usage
CLI
This package exposes the boggle command in a shell.
$ boggle --help
Usage: boggle [OPTIONS]
Options:
-s, --seed TEXT A key to create a board from
--help Show this message and exit.
If a seed valaue is not provided, a random board will be returned:
$ boggle
╒═══╤═══╤═══╤═══╕
│ R │ S │ P │ L │
├───┼───┼───┼───┤
│ N │ H │ I │ L │
├───┼───┼───┼───┤
│ N │ T │ A │ W │
├───┼───┼───┼───┤
│ B │ U │ U │ T │
╘═══╧═══╧═══╧═══╛
$ boggle
╒═══╤═══╤═══╤═══╕
│ R │ F │ M │ B │
├───┼───┼───┼───┤
│ A │ N │ N │ R │
├───┼───┼───┼───┤
│ T │ E │ R │ S │
├───┼───┼───┼───┤
│ S │ D │ T │ T │
╘═══╧═══╧═══╧═══╛
If a seed value is provided, a board will be generated deterministically from the seed value:
$ boggle -s 'fish'
╒═══╤═══╤═══╤═══╕
│ T │ F │ R │ O │
├───┼───┼───┼───┤
│ E │ C │ E │ W │
├───┼───┼───┼───┤
│ H │ E │ J │ Y │
├───┼───┼───┼───┤
│ T │ N │ V │ W │
╘═══╧═══╧═══╧═══╛
$ boggle -s 'fish'
╒═══╤═══╤═══╤═══╕
│ T │ F │ R │ O │
├───┼───┼───┼───┤
│ E │ C │ E │ W │
├───┼───┼───┼───┤
│ H │ E │ J │ Y │
├───┼───┼───┼───┤
│ T │ N │ V │ W │
╘═══╧═══╧═══╧═══╛
$ boggle -s 'hamster'
╒═══╤═══╤═══╤═══╕
│ E │ O │ B │ T │
├───┼───┼───┼───┤
│ V │ T │ E │ H │
├───┼───┼───┼───┤
│ G │ E │ E │ H │
├───┼───┼───┼───┤
│ W │ U │ P │ F │
╘═══╧═══╧═══╧═══╛
$ boggle -s 'hamster'
╒═══╤═══╤═══╤═══╕
│ E │ O │ B │ T │
├───┼───┼───┼───┤
│ V │ T │ E │ H │
├───┼───┼───┼───┤
│ G │ E │ E │ H │
├───┼───┼───┼───┤
│ W │ U │ P │ F │
╘═══╧═══╧═══╧═══╛
Python Package
Import the boggle() method from the boggle package:
from boggle import boggle
This method will return a list of 16 boggle characters (including Qu). These are intended to be arranged into a square of four characters by four characters.
If a seed value is not provided, a random board will be returned:
>>> from boggle import boggle
>>> boggle()
['B', 'A', 'S', 'T', 'H', 'U', 'M', 'H', 'R', 'P', 'E', 'R', 'O', 'T', 'O', 'N']
>>> boggle()
['A', 'E', 'T', 'L', 'E', 'E', 'W', 'D', 'E', 'D', 'J', 'T', 'Y', 'I', 'O', 'F']
>>> boggle()
['E', 'S', 'Y', 'F', 'V', 'X', 'N', 'Y', 'H', 'O', 'E', 'U', 'T', 'T', 'N', 'O']
If a seed value is provided, a board will be generated deterministically from the seed value:
>>> from boggle import boggle
>>> boggle('fish')
['T', 'F', 'R', 'O', 'E', 'C', 'E', 'W', 'H', 'E', 'J', 'Y', 'T', 'N', 'V', 'W']
>>> boggle('fish')
['T', 'F', 'R', 'O', 'E', 'C', 'E', 'W', 'H', 'E', 'J', 'Y', 'T', 'N', 'V', 'W']
>>> boggle('hamster')
['E', 'O', 'B', 'T', 'V', 'T', 'E', 'H', 'G', 'E', 'E', 'H', 'W', 'U', 'P', 'F']
>>> boggle('hamster')
['E', 'O', 'B', 'T', 'V', 'T', 'E', 'H', 'G', 'E', 'E', 'H', 'W', 'U', 'P', 'F']
© Max Levine 2022
Metadata
Release files for boggle 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| boggle-0.1.2.tar.gz | 15.4 kB | Without provenance | Details for boggle-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boggle-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for boggle-0.1.2-py3-none-any.whl |
Total release size: 30.8 kB
Release files / boggle-0.1.2.tar.gz
| Download URL | boggle-0.1.2.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28bfd0bd4ca7e11389d636e1af65e4893f1d5c07421bd3852ef56c81ccf06fb8
|
|
BLAKE2b-256 checksum How to use checksums |
fcaa5a3252fe91ac9816a9c2d9f6579438bb4efff350c89bdaa4739800b41dc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.15.0-40-generic
|
Release files / boggle-0.1.2-py3-none-any.whl
| Download URL | boggle-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70fc58aea97b800a3098658c1b93b4a375b253c3be5ab0e22403a1a02962a57b
|
|
BLAKE2b-256 checksum How to use checksums |
ed2087aba1ca90e031841b1bc6b8b87cf6d4906a38e856775f5673d0f5510b36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.15.0-40-generic
|
Security for boggle 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.