pmaher86 / blacksquare

A Python package for crossword creators.
MIT License
38 stars 13 forks source link

Fill without symmetry? #25

Closed ChronoDK closed 6 months ago

ChronoDK commented 6 months ago

Is it possible to fill a grid without forcing symmetry? I would like to define the black cells myself, like xw[0,1] = BLACK but when I do so, extra black cells are added to keep the grid symmetrical. I would really like the grid to be defined by my design instead, which is not symmetrical.

pmaher86 commented 6 months ago

Yes, this is supported. Just set xw.symmetry=None. Other symmetry modes like mirror symmetry are also supported.

ChronoDK commented 6 months ago

Thanks, that's great. I do have a problem though, that not all grid designs can be filled - many will give me an IndexError exception.

This one works fine: image

But this one (and many others) do not: image

ChronoDK commented 6 months ago

It happens every time there is a 1 cell space.

pmaher86 commented 6 months ago

Thanks for the find. This is now fixed v0.7.0. In general testing for grids that don't conform to standard American rules (every cell must be part of a word across and down) isn't as robust so let me know if you run into other issues

ChronoDK commented 6 months ago

Seems to work perfectly now - great work! Thanks for fixing it so fast 🥇