word-game-ruiner

Version, currently trunk branch1 version
  • trunk branchlatestNov 1, 2021

github.com/elebow/word-game-ruiner

No description declared in shard.yml.

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  word-game-ruiner:
    github: elebow/word-game-ruiner
    branch: trunk

trunk is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.2.1
License
MIT
Author
Eddie Lebow
Target
  • word-game-ruiner from src/word-game-ruiner.cr

Dependencies

This version declares no dependencies.

README

word-game-ruiner

Takes the fun out of the word game.

Word game?

A cooperative game wherein players create chains of words. Each word in the chain must have an edit distance of exactly 1 from the previous word, and words may not be repeated.

Usage

First, create a next-words file from a wordlist. Ideally, the input wordlist will be the set of legal words for your game.

word-game-ruiner generate -w /usr/share/dict/words -o nexts.json

Find all legal next words from a given game state:

word-game-ruiner next -n nexts.json -g fun,fan,fin,fine

Find legal word with the greatest number of following words:

word-game-ruiner next --maximize -n nexts.json -g fun,fan,fin,fine

Find legal words, if any, that have no legal following words:

word-game-ruiner next --terminate -n nexts.json -g fun,fan,fin,fine