README

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