Example #1
0
        public Bee GetBee(string key)
        {
            Bee bee = null;

            if (this.bees.ContainsKey(key))
            {
                bee = this.bees[key];
            }
            else
            {
                switch (key)
                {
                case "scout":
                    bee = new BeesScouts();
                    break;

                case "queen":
                    bee = new QueenBee();
                    break;

                case "collector":
                    bee = new BeesColectors();
                    break;
                }

                this.bees.Add(key, bee);
            }

            return(bee);
        }
Example #2
0
        public Bee GetBee(string key)
        {
            Bee bee = null;
            if (this.bees.ContainsKey(key))
            {
                bee = this.bees[key];
            }
            else
            {
                switch (key)
                {
                    case "scout":
                        bee = new BeesScouts();
                        break;
                    case "queen":
                        bee = new QueenBee();
                        break;
                    case "collector":
                        bee = new BeesColectors();
                        break;
                }

                this.bees.Add(key, bee);
            }

            return bee;
        }