Skip to content

warmans/go-crossword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a2e039 · Sep 8, 2024

History

16 Commits
Jul 18, 2024
Jul 18, 2024
Jul 25, 2024
Sep 8, 2024
Jul 18, 2024
Jul 15, 2024
Jul 18, 2024
Jul 18, 2024
Sep 8, 2024
Jul 18, 2024
Jul 25, 2024
Jul 17, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024

Repository files navigation

Go Crossword

Package to generate a valid crossword puzzle from a list of words/clues.

Loosely based on: https://stackoverflow.com/a/22256214

The package does not guarantee all words can be placed in the grid but in general will usually get there if it's possible to do so (given enough attempts).

Interactive: DEMO

Example:

  $ go run example/simple/main.go sample/words.json  

or to see completed:

  $ SOLVE_ALL=true go run example/simple/main.go sample/words.json  

This will generate the following crossword from the given words file: sample/words.json

Note on interactive crosswords

If the crossword is being solved interactively you would need to store the generated Crossword (e.g. json encode it to a file). This can easily be decoded and rendered without altering the layout.

About

Crossword generator Go package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published