public int[] GetResult(object input) { Actions[] actions = (Actions[])input; int[] result = new int[actions.Length + 1]; GarageDoor door = new GarageDoor(); result[0] = door.GetCodeCurrentState(); for (int i = 0; i < actions.Length; i++) { if (actions[i] == Actions.Click) { door.PressClick(); } else { door.Wait(); } result[i + 1] = door.GetCodeCurrentState(); } return(result); }