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 hashes)

Uploaded Source

Built Distribution

lbsolver-1.0.0-py3-none-any.whl (7.3 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