Exemplo n.º 1
0
	public List<int> GetInputValues(EquationOperand equation, List<int> inputVals)
	{
		if (equation.operand1.GetType() == typeof(ValueOperand))
		{
			inputVals.Add(equation.operand1.GetValue());
//			Debug.Log (equation.operand1.GetValue());
		}
		else
		{
			inputVals = GetInputValues((EquationOperand) equation.operand1, inputVals);
		}
		
		if (equation.operand2.GetType() == typeof(ValueOperand))
		{
			inputVals.Add (equation.operand2.GetValue());
//			Debug.Log (equation.operand2.GetValue());

		}
		else
		{
			inputVals = GetInputValues((EquationOperand) equation.operand2, inputVals);

		}
		return inputVals;
	}
Exemplo n.º 2
0
	// Use this for initialization
	public Equation(int _solution, EquationOperand _operand)
	{
		solution = _solution;
		operand = _operand;
	}