private void SetEdgeColorBonus(int edgeIndex) { CardGrid otherCard = GetAdjacentCard(edgeIndex); activeCard.SetEdgeColor((edgeIndex + 4 - activeCard.rotation) % 4, Color.green); otherCard?.SetEdgeColor((edgeIndex + 6 - otherCard.rotation) % 4, Color.green); }
private void SetEdgeColorPenalty(int edgeIndex) { CardGrid otherCard = GetAdjacentCard(edgeIndex); activeCard.SetEdgeColor((edgeIndex + 4 - activeCard.rotation) % 4, Color.red); otherCard?.SetEdgeColor((edgeIndex + 6 - otherCard.rotation) % 4, Color.red); }
private void ResetEdgeAndNeighborsColor() { for (int i = 0; i < 4; i++) { CardGrid otherCard = GetAdjacentCard(i); activeCard.SetEdgeColor((i + 4 - activeCard.rotation) % 4, Color.black); otherCard?.SetEdgeColor((i + 6 - otherCard.rotation) % 4, Color.black); } }