Skip to main content

A package containing a solver for the NYT Letter Boxed Game

Project description

Introduction

Python tests Pages site Code scanning

This is a simple script to solve the NYT Letter Boxed game. The user supplies a words file and a Letter Boxed gamehe words file is used to generate winning combinations for Letter Boxed.

Good recommendations for words files include:

  • The words file included with Linux
  • The Moby II projects common words file

Installation

  1. Clone the repo
  2. Create a virtual environment
  3. Open a terminal and cd into the cloned directory
  4. Type: 'python -m pip install -e .' to create an editable install

Usage

Using an example on a Python REPL in Linux

from lbsolver import Gameboard, LBSolver
board = Gameboard("t n m h r v i k e a u b".split())
FILE = '/usr/share/dict/words'
with open(FILE,'r') as my_file:
    dictionary = my_file.readlines()


solver = LBSolver(board, dictionary)
answers = solver.solve(max_num_words=3, minimum_answers=10)
print(answers)

Command line

Type the following at the command prompt to see command line usage:

lbsolver -h

The API

A simple API

Our License

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

lbsolver-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

lbsolver-1.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file lbsolver-1.0.0.tar.gz.

File metadata

  • Download URL: lbsolver-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for lbsolver-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2a4cd6e9428c4539152e989e7b6dff66310abf744178517f4fc48520e7faded9
MD5 5acbf7cc61148f1d9d3cabadda56e198
BLAKE2b-256 8b12eafef7728d452b6a879eec75b9133af612209c4c4a36c0f58eaac23fcc1d

See more details on using hashes here.

File details

Details for the file lbsolver-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lbsolver-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for lbsolver-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fee36c3f2f7308acd5a7a2aaed44fe2f1b697078b10aa0e6c0fff32b1c3cfc3f
MD5 b16ebd7d855d19acd199a9bf82499cef
BLAKE2b-256 81b2e5ee439d5c10a0f61834d02d1b350d939b1bf863cd8f8d13ea185608c270

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