This repository contains a set of two libraries that can be individually downloaded to help solve the Letter Boxed and Spelling Bee puzzles on the NY Times Games website (link).
Download NYTimesGames JAR Files
Instructions on how to install & import the libraries into a Java project are available here.
In order to access the methods in each class, you must first create an object of the class.
Here are the constructors' headers for both the LetterBoxed and SpellingBee classes:
public LetterBoxed(String[][] inputLetterGrid) public LetterBoxed(String urlPath, String[][] inputLetterGrid) public SpellingBee(String inputMainLetter, String inputOtherLetters) public SpellingBee(String urlPath, String inputMainLetter, String inputOtherLetters)
To instantiate a LetterBoxed object, a 2D String
array (representing the Letter Boxed grid) must be inputted. For example, if a Letter Boxed grid looks like this:
then the input 2D String
array should be declared like so:
String[][] grid = { { "a", "k", "r" }, { "t", "e", "g" }, { "h", "u", "l" }, { "w", "o", "f" } };
The ordering of the letters inside a particular subarray should not matter.
If you choose to create an object with the first constructor, a default word list is automatically inputted for the program to utilize for its computations. If you would like to provide the program with a custom word list, create an object with the second constructor and provide the program with a URL (in String
format) of an online word list. The custom word list file must have each word on a separate line. Here is an example:
String url = "https://raw.githubusercontent.com/dwyl/english-words/master/words.txt";
To instantiate a SpellingBee object, a String
containing the center letter and a String
containing the surrounding letters must be inputted. For instance, if a Spelling Bee board looks like this:
then the String
inputs should be declared like so:
String centerLetter = "o"; String surroundingLetters = "lamdni";
The ordering of the surrounding letters should not matter.
If you choose to create an object with the first constructor, a default word list is automatically inputted for the program to utilize for its computations. If you would like to provide the program with a custom word list, create an object with the second constructor and provide the program with a URL (in String
format) of an online word list. The custom word list file must have each word on a separate line. Here is an example:
String url = "https://raw.githubusercontent.com/dwyl/english-words/master/words.txt";
Java documentation for both NYTimesGames libraries are available in the download page.
- INITIAL RELEASE
- returns words with minimum length of 4 letters
- INITIAL RELEASE
- Keep in mind that some of the words outputted by the methods in these libraries may not be inputted into the game, since the word list used by the NY Times is different than the ones accessed by these classes.
- When creating inputs, please try to keep all letters in lower case.
These libraries are protected by the GNU GPL license.