/// <summary> /// flips the chip /// </summary> /// <param name="num"></param> /// <param name="sym"></param> /// <returns>returns false if the chip was not found</returns> bool FlipChip(int num, Alpha sym) { GameObject[] chipObjects = GameObject.FindGameObjectsWithTag("Chip"); foreach (GameObject obj in chipObjects) { Chip currChip = obj.GetComponent <Chip>(); if (currChip.Sym == sym && currChip.Num == num) { mainMatrix[num - 1, (int)sym] *= -1; currChip.Flip(); return(true); } } return(false); }