예제 #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
예제 #2
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
예제 #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)