Skip to content

CaptMD-11/NYTimesGames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NYTimesGames

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

Importing into Projects

Instructions on how to install & import the libraries into a Java project are available here.

How does the user input data?

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)

LetterBoxed

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"; 

SpellingBee

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"; 

Documentation

Java documentation for both NYTimesGames libraries are available in the download page.

Letter Boxed Version History

v1.0

  • INITIAL RELEASE

Spelling Bee Version History

v1.1

  • returns words with minimum length of 4 letters

v1.0

  • INITIAL RELEASE

Important Notes

  • 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.

License

These libraries are protected by the GNU GPL license.