예제 #1
0
        static void Main(string[] args)
        {
            AbstractFormationBuilder builder = new AttackingFormationBuilder();
            FootballManager          manager = new FootballManager(builder);

            manager.BuildFormation();
            FootballFormation formation = builder.GetFormation();

            Console.WriteLine("Attacking Formation: ");
            formation.DisplayFormation();

            builder = new DefensiveFormationBuilder();
            manager = new FootballManager(builder);
            manager.BuildFormation();
            formation = builder.GetFormation();
            Console.WriteLine("Defensive Formation: ");
            formation.DisplayFormation();
        }
예제 #2
0
 public AbstractFormationBuilder()
 {
     formation = new FootballFormation();
 }