示例#1
0
        private static void Main(string[] args)
        {
            Pokemon pokemon = PokemonFactory.CreateInstance(1);

            pokemon.attackBehavior = BehaviorFactory.CreateBehavior("魯夫橡膠戰斧");
            pokemon.Attack(pokemon);
        }
示例#2
0
 private static void Main(string[] args)
 {
     Pokemon pokemon1 = PokemonFactory.CreateInstance(int.Parse(args[0]));
     Pokemon pokemon2 = PokemonFactory.CreateInstance(int.Parse(args[1]));
 }