public Board ProcessInputSequence(string inputCommands, Board inputBoard) { return inputCommands.Aggregate(inputBoard, PerformCommand); }
public Board PerformCommand(Board presentBoard, char key) { command = GetCommand(key == 'M' ? presentBoard.Peg.Direction[0] : key); command.Execute(presentBoard); return command.UpdatedBoard; }