Пример #1
0
        public Fighter CreateFighter(string fighterType)
        {
            Fighter newFighter;

            switch (fighterType.ToUpper())
            {
            case "CLASSIC FIGHTER":
                newFighter = new ClassicFighter();
                break;

            case "MASTER FIGHTER":
                newFighter = new MasterFighter();
                break;

            case "STUDENT FIGHTER":
                newFighter = new StudentFighter();
                break;

            default:
                newFighter = new ClassicFighter();
                break;
            }

            return(newFighter);
        }
Пример #2
0
        public Fighter CreateFighter(string fighterType)
        {
            Fighter newFighter;
            switch (fighterType.ToUpper())
            {
                case "CLASSIC FIGHTER":
                    newFighter = new ClassicFighter();
                    break;

                case "MASTER FIGHTER":
                    newFighter = new MasterFighter();
                    break;

                case "STUDENT FIGHTER":
                    newFighter = new StudentFighter();
                    break;

                default:
                    newFighter = new ClassicFighter();
                    break;
            }

            return newFighter;
        }