Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var program = new Program();

            Console.WriteLine("Elf Kingdom");
            program.createKingdom(FactoryMaker.makeFactory(KingdomType.ELF));
            Console.WriteLine(program.getArmy().getDescription());
            Console.WriteLine(program.getCastle().getDescription());
            Console.WriteLine(program.getKing().getDescription());

            Console.WriteLine("Orc Kingdom");
            program.createKingdom(FactoryMaker.makeFactory(KingdomType.ORC));
            Console.WriteLine(program.getArmy().getDescription());
            Console.WriteLine(program.getCastle().getDescription());
            Console.WriteLine(program.getKing().getDescription());
        }
Ejemplo n.º 2
0
 public FactoryFixture()
 {
     elfFactory = FactoryMaker.makeFactory(KingdomType.ELF);
     orcFactory = FactoryMaker.makeFactory(KingdomType.ORC);
 }