static void Main(string[] args) { BLChallenge solver = new BLChallenge(); DateTime startTime = DateTime.Now; int tryCounter = 0; while (!solver.IsSolved()) { tryCounter++; if (tryCounter % 250000 == 0) Console.WriteLine(tryCounter); solver.Scramble(); } Console.WriteLine("Solution found after {0} iterations, {1} minutes", tryCounter, (DateTime.Now - startTime).TotalMinutes); solver.Print(); }
static void Main(string[] args) { BLChallenge solver = new BLChallenge(); DateTime startTime = DateTime.Now; int tryCounter = 0; while (!solver.IsSolved()) { tryCounter++; if (tryCounter % 250000 == 0) { Console.WriteLine(tryCounter); } solver.Scramble(); } Console.WriteLine("Solution found after {0} iterations, {1} minutes", tryCounter, (DateTime.Now - startTime).TotalMinutes); solver.Print(); }