public virtual void SetActivated(bool newValue) { isActive = newValue; foreach (var cable in cables) { cable.color = newValue ? Color.yellow : Color.white; } if (newValue) { ActivateNextSquare(); } else { if (next != null) { next.prev = null; next.SetActivated(false); this.next = null; } } }