ivapylibs / puzzle_solver

1 stars 2 forks source link

Gridded puzzle class and edge label: left, right, top, bottom OR north, south, east, west OR just 0, 1, 2, 3? #26

Closed pv33 closed 2 years ago

pv33 commented 3 years ago

figure out what class the boundary points should be assigned. Puzzle pieces have a canonical orientation with the gridded pieces having four sides. Should there be a gridded subclass of puzzle piece with the proper processing to decompose the piece into distinct regions or boundary curves?

Think through an come up with a candidate class structure for puzzle pieces that fit into a grid and have four sides. How does the most basic version look? What would be a step or two up in complexity.

Uio96 commented 3 years ago

Currently, I create a new subclass of the piece.template called regular, which means the puzzle template has four edges. And the edge label is assigned in an enum class https://github.com/ivapylibs/puzzle_solver/blob/master/puzzle/piece/regular.py#L43-L49. It can be modified easily if we have other ideas.