6.0.4 • Published 7 months ago

jotto v6.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
7 months ago

jotto

Jotto solver.

Example

With a JSON file of previous guesses and their scores:

{
  "bread": 1,
  "anvil": 2
}

Pipe it into jotto to get the best possible next guess:

$ jotto < guesses.json

    Imported : 12,478 words
       Using :  8,013 words
    Possible :    935 words
  Best guess : irone

Installation

For the jotto command-line executable:

$ npm install -g jotto

For programmatic usage:

$ npm install jotto

API

var jotto = require('jotto');

jotto.narrowDownPossibleWords(words, previousGuesses)

Given an Array words of words and an Object previousGuesses like this:

{
  'bread': 1,
  'anvil': 2
}

...wherein each key is a guess and each value is the score (in jots) that the guess received, narrows down the possible solutions to the current puzzle and returns the narrowed-down Array of words.

jotto.bestGuess(words, possibleWords)

Given the Array words that you used for jotto.narrowDownPossibleWords and the Array possibleWords that was returned, returns the word that would narrow down the possible words the most (the "best guess").

6.0.1

7 months ago

6.0.3

7 months ago

6.0.2

7 months ago

6.0.4

7 months ago

6.0.0

8 months ago

5.0.6

11 months ago

5.0.5

1 year ago

5.0.4

1 year ago

5.0.3

1 year ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

4.1.6

2 years ago

4.1.5

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

3.0.8

2 years ago

4.0.0

2 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.23

4 years ago

2.1.22

4 years ago

2.1.21

4 years ago

2.1.20

4 years ago

2.1.18

4 years ago

2.1.19

4 years ago

2.1.17

4 years ago

2.1.16

4 years ago

2.1.15

4 years ago

2.1.14

4 years ago

2.1.13

4 years ago

2.1.12

4 years ago

2.1.11

4 years ago

2.1.10

4 years ago

2.1.9

7 years ago

2.1.8

8 years ago

2.1.7

9 years ago

2.1.6

9 years ago

2.1.5

9 years ago

2.1.4

9 years ago

2.1.3

10 years ago

2.1.2

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago