Sign in to follow this  

Generating box boundaries that don't overlap

Recommended Posts

silverphyre673    454
I'm working on a program to generate Sudoku. It supports arbitrary grid sizes (with the constraint that the size of the grid must be a multiple of either two or three), and box boundaries. What I'm working on right now is an algorithm to arbitrarily generate random, non-rectangular, non-overlapping box boundaries. Whereas a normal Sudoku grid has its interior boxes in a perfectly square or rectangular arrangement, I want to be able to generate boxes that don't overlap. Here are the constraints/requirements 1) The full grid is square. The number of elements wide/high is a multiple of two or three. 2) Each box must have a number of elements equal to the grid's size (its width/height). 3) No box can overlap another one. 4) The boxes, taken together, must fill the grid perfectly, with no elements outside it and no spaces inside it that are not part of a box. Anybody have any ideas/links? Thanks a bunch!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this