public int GetAnswer() { _data = DataGetter.GetData(); ProcessInstruction(_data[0]); return(_answer); }
public int GetAnswer() { _data = DataGetter.GetData(); for (int i = 0; i < _data.Count; i++) { _answer = 0; SwitchInstruction(_data[i]); ProcessInstruction(_data[0]); if (_data[_data.Count - 1].Completed) { return(_answer); } SwitchInstruction(_data[i]); _data.ForEach(a => a.Completed = false); } return(_answer); }