public static void Main(string[] args) { // Start time System.Console.WriteLine("Program starting at {0}.", System.DateTime.Now.ToLongTimeString()); // Set up the puzzle BlockPuzzle FourByFourbyFour = new BlockPuzzle(BlockOrder); // Solve it! BlockPuzzle.Solve(FourByFourbyFour); // End time System.Console.WriteLine("Program ending at {0}.", System.DateTime.Now.ToLongTimeString()); System.Console.WriteLine("{0} total positions considered!", FourByFourbyFour.PositionCount); System.Console.ReadLine(); }
public static void Main(string[] args) { // Start the timer Stopwatch stopwatch = Stopwatch.StartNew(); // Go! Console.WriteLine("Program starting at {0}.", DateTime.Now.ToLongTimeString()); // Solve it! BlockPuzzle.Solve(BlockOrder); // End time stopwatch.Stop(); Console.WriteLine("Program ending at {0}.", DateTime.Now.ToLongTimeString()); Console.WriteLine("Total program time was {0:hh\\:mm\\:ss}", stopwatch.Elapsed); Console.WriteLine("Press Enter to exit."); Console.ReadLine(); }