import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;

public class CS111WordleTool { // can play at https://wordlegame.org/

	public static void main(String[] args) {
		// create an ArrayList of all the words in the dictionary file "enable".
		// The dictionary file is a text file with one word per line.
		// The file is in the same directory as the program.
	
		ArrayList<String> words = new ArrayList<String>();
		try {
			File file = new File("/Courses/cs112/ENABLE");
			Scanner scanner = new Scanner(file);
			while (scanner.hasNext()) {
				String word = scanner.next();
				if (word.length() == 5) {
					words.add(word);
				}
			}
			scanner.close();
		} catch (FileNotFoundException e) {
			System.out.println("File not found.");
		}
		
		// Create a read/eval/print loop that reads a line from the user.  
		// If the line is "exit", the program should terminate.
		// Otherwise, the line should be split into two tokens: 
		// The first token is a word guess, the second token is a Wordle response string of the same length,
		// where Y means the letter is in the word at the correct position, 
		// y means the letter is in the word but not at the correct position,
		// and n means the letter is not in the word.
		// The program should then print out all the words in the dictionary that are consistent with
		// all guess and response pairs.
	}

}
