SeanPlusPlus / wordle

handy little tool to help with wordle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WORDLE

Use this tool to filter the possible words you can play with wordle.

The example data structures used in this script are based on this game from January 18, 2022:

wordle

How to

If we know a character is not present, add it to this variable:

var not_present = [
    'b',
    'l',
    'a',
    's',
    't',
  ];

And this array is used to track if a character is present and whether or not we know it's position:

 var present = [
    {
      char: 'p',
      pos: true,
    },
    {
      char: 'o',
      pos: false,
    },
    {
      char: '',
      pos: null,
    },
    {
      char: '',
      pos: null,
    },
    {
      char: '',
      pos: null,
    },
  ];

Example Output

$ node index.js
[
  'pekoe', 'pengo', 'peony',
  'phone', 'phony', 'pinko',
  'primo', 'prior', 'proem',
  'promo', 'prone', 'prong',
  'proof', 'proud', 'prove',
  'proxy'
] 16

About

handy little tool to help with wordle


Languages

Language:JavaScript 100.0%