/// <summary> /// Find matches, award mana, remove matches /// </summary> internal void Update() { // Find matches List <GameObject> Matches = FindMatches(); // Give mana to player for matched cells int[] collected = new int[6]; foreach (GameObject cell in Matches) { collected[cell.GetComponent <BoardCell>().SpriteIndex] += 1; } CurrentPlayer.ChangeMana(collected); // Remove matched cells from board RemoveMatches(Matches); }