Skip to main content

A package for creating crossword puzzles by Orchid Box.

Project description

Puzzle Creator

A Python package for creating crossword puzzles.

Creator is Frank Vitetta

CEO and Founder of Orchid Box Agency

Installation

You can install the package using pip: pip install puzzlecreator

Usage

from puzzlecreator import crossword

word_list = ["GAME", "BR", "PEALED", "KILLS", "SHOP", "FIG", "PAW", "PUFFED", "BULLET", "MOLLIFY", "KIDS"] max_time= 5 #number of seconds to find the most efficient combination

result = crossword.repeated_word_placement(word_list, max_time=5)

crossword.print_crossword(result)

Explanation

1.	Intersection Points: Finds potential intersection points where new words can intersect with existing ones.
2.	Placement Scoring: Evaluates each potential placement based on how well it intersects with existing words and the overall compactness of the crossword grid.
3.	Best Placement Selection: Iterates over possible placements for each word, selects the best one based on the score, and updates the grid accordingly.
4.	Multiple Attempts: Generates multiple crossword puzzles within a given time frame (5 seconds is default) and selects the best one based on the scoring criteria.
5.	Trimming the Grid: Before printing, removes any empty rows or columns to ensure a more compact grid.
6.	Result Printing: The final crossword grid is printed with words intersecting properly, and empty spaces are filled with dots (’.’).
pip install puzzlecreator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

puzzlecreator-1.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

puzzlecreator-1.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file puzzlecreator-1.1.1.tar.gz.

File metadata

  • Download URL: puzzlecreator-1.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for puzzlecreator-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a5bf388b32184d05dfd20af6b2408c1b4faffe5b2c127d6f5837284d3349e821
MD5 0a70ee3801b755426e2a4502a35cff56
BLAKE2b-256 02e11461364faa7524202ab41e206850df9e95fc1f8414935f876fc32b35dbed

See more details on using hashes here.

File details

Details for the file puzzlecreator-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: puzzlecreator-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for puzzlecreator-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72c29b94994163f73696aa9cd5319b224bd5fd29ed3a3349e2ad4832e60aa6cb
MD5 2e0478fedab659e7380c425e716c2a19
BLAKE2b-256 8f7fe645e9931b98fe44264666284897450fa568e85f3c0a1581850b889c6da7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page