var puzzlegenerator = new puzzlegenerator(); var prearrivalinstructions = puzzlegenerator.prepareinstructions("turn a blind eye to the statutes and return to the beginning if you must, to separate the pieces correctly"); foreach(var piece in puzzlegenerator.generatepuzzles()) { if(!piece.fitswithprevious()) { puzzlegenerator.resettostart(); } }