public bool Matches(ColArray other)
    {
        if (this.Length() != other.Length())
        {
            return(false);
        }
        int length = Mathf.Min(this.Length(), other.Length());

        for (int i = 0; i < length; i++)
        {
            if (GetValue(i) != other.GetValue(i))
            {
                return(false);
            }
        }
        return(true);
    }
Esempio n. 2
0
 public override void Step()
 {
     //Output only reads from num1 var
     GetFromReceiver();
     if (num1 != 0 && outputColumn.Length() < expectedOutputColumn.Length())
     {
         outputColumn.AddValue(num1);
     }
 }
 private void CheckAndHandleMistakes(int index)
 {
     if (index >= highlights.Count)
     {
         return;
     }
     if (index >= rightColumn.Length())
     {
         //Index is between right column length and highlights length
         //This is when right column values are null
         highlights[index].enabled = false;
         return;
     }
     else
     {
         highlights[index].enabled = (leftColumn.GetValue(index) != rightColumn.GetValue(index));
     }
 }