static void Main(string[] args) { var commands = ReadCommandsFromFile("Samples.txt"); var driver = new RobotDriver(new Robot(new Map())); foreach (var command in commands) { if (!string.IsNullOrEmpty(command)) { driver.AddCommand(command); } } driver.Drive(); driver.Reports.ForEach(r => Console.WriteLine(r)); driver.Reset(); }