Exemplo n.º 1
0
        //add Astromech
        public void AddA()
        {
            Dptions("Astromech");

            Console.WriteLine("==========================================================================");
            Droid newAstromech = new AstromechDroid(materailSelect, "Astromech", colorSelect, toolBox, computerConnection, arm, fireExtinquisher, numberShips);

            droidCollection.Add(newAstromech);
            newAstromech.CalculateBaseCost();
            newAstromech.CalculateTotalCost();
            totalCost += newAstromech.totalCost;
            Console.WriteLine("COLLECTED: " + newAstromech);
            Console.WriteLine("==========================================================================");
            Console.WriteLine();
        }
Exemplo n.º 2
0
        //adds dummy hardcoded droids
        //decided to shuffle the order of droids for testing
        public void DummyDroids()
        {
            //variables for dummy droid #1
            string material1 = "Steel";
            string color1    = "Blue";
            int    language1 = 2;

            //dummy Protocol #1
            Droid dumbProtocol1 = new ProtocolDroid(material1, "Protocol", color1, language1);

            droidCollection.Add(dumbProtocol1);
            dumbProtocol1.CalculateBaseCost();
            dumbProtocol1.CalculateTotalCost();
            totalCost += dumbProtocol1.totalCost;


            //variables for dummy droid #3
            string material3     = "Fiberglass";
            string color3        = "White";
            bool   dumbTool1     = true;
            bool   dumbComputer1 = false;
            bool   dumbArm1      = true;
            bool   dumbFire1     = true;
            int    dumbShip1     = 150;

            //dummy Astromech #1
            Droid dumbAstromech1 = new AstromechDroid(material3, "Astromech", color3, dumbTool1, dumbComputer1, dumbArm1, dumbFire1, dumbShip1);

            droidCollection.Add(dumbAstromech1);
            dumbAstromech1.CalculateBaseCost();
            dumbAstromech1.CalculateTotalCost();
            totalCost += dumbAstromech1.totalCost;


            //variables for dummy droid #2
            string material2 = "Wood";
            string color2    = "Red";
            int    language2 = 20;

            //dummy Protocol #2
            Droid dumbProtocol2 = new ProtocolDroid(material2, "Protocol", color2, language2);

            droidCollection.Add(dumbProtocol2);
            dumbProtocol2.CalculateBaseCost();
            dumbProtocol2.CalculateTotalCost();
            totalCost += dumbProtocol2.totalCost;

            //variables for dummy droid #5
            string material5     = "Steel";
            string color5        = "Red";
            bool   dumbTool3     = true;
            bool   dumbComputer3 = true;
            bool   dumbArm3      = true;

            //dummy Utility #1
            Droid dumbUtility1 = new UtilityDroid(material5, "Utility", color5, dumbTool3, dumbComputer3, dumbArm3);

            droidCollection.Add(dumbUtility1);
            dumbUtility1.CalculateBaseCost();
            dumbUtility1.CalculateTotalCost();
            totalCost += dumbUtility1.totalCost;


            //variables for dummy droid #4
            string material4     = "Plastic";
            string color4        = "Gold";
            bool   dumbTool2     = false;
            bool   dumbComputer2 = false;
            bool   dumbArm2      = false;
            bool   dumbFire2     = false;
            int    dumbShip2     = 4;

            //dummy Astromech #2
            Droid dumbAstromech2 = new AstromechDroid(material4, "Astromech", color4, dumbTool2, dumbComputer2, dumbArm2, dumbFire2, dumbShip2);

            droidCollection.Add(dumbAstromech2);
            dumbAstromech2.CalculateBaseCost();
            dumbAstromech2.CalculateTotalCost();
            totalCost += dumbAstromech2.totalCost;

            //variables for dummy droid #8
            string material8     = "Steel";
            string color8        = "Red";
            bool   dumbTool6     = true;
            bool   dumbComputer6 = true;
            bool   dumbArm6      = true;
            bool   dumbTrash2    = true;
            bool   dumbVacuum2   = true;

            //dummy Janitor #2
            Droid dumbJanitor2 = new JanitorDroid(material8, "Janitor", color8, dumbTool6, dumbComputer6, dumbArm6, dumbTrash2, dumbVacuum2);

            droidCollection.Add(dumbJanitor2);
            dumbJanitor2.CalculateBaseCost();
            dumbJanitor2.CalculateTotalCost();
            totalCost += dumbJanitor2.totalCost;


            //variables for dummy droid #6
            string material6     = "Steel";
            string color6        = "Black";
            bool   dumbTool4     = true;
            bool   dumbComputer4 = false;
            bool   dumbArm4      = false;

            //dummy Utility #2
            Droid dumbUtility2 = new UtilityDroid(material6, "Utility", color6, dumbTool4, dumbComputer4, dumbArm4);

            droidCollection.Add(dumbUtility2);
            dumbUtility2.CalculateBaseCost();
            dumbUtility2.CalculateTotalCost();
            totalCost += dumbUtility2.totalCost;


            //variables for dummy droid #7
            string material7     = "Wood";
            string color7        = "Blue";
            bool   dumbTool5     = false;
            bool   dumbComputer5 = true;
            bool   dumbArm5      = true;
            bool   dumbTrash1    = true;
            bool   dumbVacuum1   = false;

            //dummy Janitor #1
            Droid dumbJanitor1 = new JanitorDroid(material7, "Janitor", color7, dumbTool5, dumbComputer5, dumbArm5, dumbTrash1, dumbVacuum1);

            droidCollection.Add(dumbJanitor1);
            dumbJanitor1.CalculateBaseCost();
            dumbJanitor1.CalculateTotalCost();
            totalCost += dumbJanitor1.totalCost;
        }