Finished board generation code (with specified set count)