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