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