public void CheckSides() { for (int i = 0; i < sides.Length; i++) { if (sides[i]) { Sides side = (Sides)i; Point dir = side.Direction(y); HexLogic hex = grid.At(x + dir.x, y + dir.y); Sides invertedSide = side.Inverted(); int invertedSideIndex = (int)invertedSide; if (hex && !hex.Active && hex.sides[invertedSideIndex]) { hex.Active = true; } } } }