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