示例#1
0
 def loadPokemonFromXML(self, trainer, tree):
     """ Loads the Trainer's Pokemon from XML """
     pokemon = []
     tree = tree.find(Tags.beltTag)
     
     for pkmn in tree.getiterator(Tags.pokemonTag):
         pokemon.append(PokemonFactory.loadFromXML(pkmn))
     
     trainer.beltPokemon = pokemon
    def loadPokemonFromXML(self, trainer, tree):
        """ Loads the Trainer's Pokemon from XML """
        pokemon = []
        tree = tree.find(Tags.beltTag)

        for pkmn in tree.getiterator(Tags.pokemonTag):
            pokemon.append(PokemonFactory.loadFromXML(pkmn))

        trainer.beltPokemon = pokemon
示例#3
0
def BuildPokemon(pkmn="BULBASAUR"):
    """ Builds a Pokemon """
    return PokemonFactory.buildStarter(pkmn)
示例#4
0
 def  setUp(self):
     """ Build the *** for the test """
     self.pkmn = BuildPokemon()
     self.copy = PokemonFactory.copy(self.pkmn)
示例#5
0
def BuildPokemon(pkmn = "BULBASAUR"):
    """ Builds a Pokemon """
    return PokemonFactory.buildStarter(pkmn)
 def setPkmn(self, pkmn):
     """ Set the PkmnBattleWrapper's Pokemon """
     self.original = pkmn
     self.pkmn = PokemonFactory.copy(pkmn)