예제 #1
0
    public static void Part2()
    {
        BagAnalyzer analyzer = new BagAnalyzer();

        analyzer.LoadBagData();
        int numberOfUniqueChildren = analyzer.GetNumChildrenOfBag("shiny gold") - 1; // -1 b/c it includes starting bag

        Console.WriteLine("Total child bags of 'shiny gold bag' = " + numberOfUniqueChildren.ToString());
    }
예제 #2
0
    public static void Part1()
    {
        BagAnalyzer analyzer = new BagAnalyzer();

        analyzer.LoadBagData();
        int numberOfUniqueParents = analyzer.GetUniqueParentsOfBag("shiny gold");

        Console.WriteLine("Total unique parents of 'shiny gold bag' = " + numberOfUniqueParents.ToString());
    }