move __pokemon_type_dictionary from class --> instance

https://github.com/LazoCoder/Pokemon-Terminal/pull/81#issuecomment-312487428

This is ready for review.
This commit is contained in:
cclauss 2017-07-02 16:34:34 +02:00 committed by GitHub
parent 56cfcedb49
commit 47380b5df8

View file

@ -61,7 +61,6 @@ class Pokemon:
class Database:
"""The Database object is a container for all the supported Pokemon."""
__pokemon_type_dictionary = {}
__POKEMON_TYPES = ('normal', 'fire', 'fighting', 'water', 'flying',
'grass', 'poison', 'electric', 'ground', 'psychic',
'rock', 'ice', 'bug', 'dragon', 'ghost', 'dark',
@ -73,6 +72,7 @@ class Database:
def __init__(self):
self.__pokemon_list = []
self.__pokemon_dictionary = {}
self.__pokemon_type_dictionary = {}
self.directory = os.path.dirname(os.path.realpath(__file__))
for pkmn_t in self.__POKEMON_TYPES:
self.__pokemon_type_dictionary[pkmn_t] = []