public void Visit(SkillNode skillNode) { if (!skillNode.IsLocked()) { skillNode.ShouldGoDown = true; return; } bool canBeUnlocked = true; skillNode.DependsOn .ForEach(baseSkillNode => canBeUnlocked = canBeUnlocked && !baseSkillNode.IsLocked()); if (canBeUnlocked) { skillNode.SetCanBeUnlocked(); } skillNode.ShouldGoDown = false; }