# Path: pokemonterminal/database.py
# class Pokemon:
#     """Class to represent pokemons"""
#     # ID is stored as a string because it must maintain "003" format, not "3".
#     __id = ""
#     __name = ""
#     __region = ""
#     __path = ""  # The location of the image.
#     __pkmn_type = ""
#     __pkmn_type_secondary = ""
#     __dark_threshold = 0.5
# 
#     def __init__(self, identifier, name, region, path, pkmn_type,
#                  pkmn_type_secondary, dark_threshold):
#         self.__id = identifier
#         self.__name = name
#         self.__region = region
#         self.__path = path
#         self.__dark_threshold = float(dark_threshold)
#         self.__pkmn_type = pkmn_type
#         self.__pkmn_type_secondary = pkmn_type_secondary
# 
#     def get_id(self):
#         # Pokemon from folder 'Extra' have no ID.
#         return self.__id or "---"
# 
#     def get_name(self):
#         return self.__name
# 
#     def get_region(self):
#         return self.__region
# 
#     def get_path(self):
#         return self.__path
# 
#     def get_pkmn_type(self):
#         return self.__pkmn_type
# 
#     def get_pkmn_type_secondary(self):
#         return self.__pkmn_type_secondary
# 
#     def get_dark_threshold(self):
#         return self.__dark_threshold
# 
#     def is_extra(self):
#         return self.__id is None
# 
#     def __str__(self):
#         name = self.get_name().title()
#         return self.get_id() + " " + name + " at " + self.get_path()


import collections
import os
from pokemonterminal.database import Pokemon
    assert False, 'region_name_by_id({})'.format(id)


def make_a_pokemon(id, line):
    id = '{:03}'.format(id)
    line = line.strip().split()
    while len(line) < 4:  # add '' as the subtype if it is missing
        line.append('')
    name, threshold, main_type, subtype = line
    name = name.lower()
    threshold = float(threshold)
    region = region_name_by_id(id)
    dir_name = region_dict[region].dir_name
    path = os.path.join(IMAGES_DIR, dir_name, id + '.jpg')
    return Pokemon(id, name, region, path, main_type, subtype, threshold)


def load_pokemon(filename='pokemon.txt'):
    """Load everything but the Pokemon from the 'Extra' folder"""
    with open(os.path.join(DATA_DIR, filename)) as in_file:
        return [make_a_pokemon(i, line) for i, line in enumerate(in_file, 1)]


def make_an_extra_pokemon(filename, in_ext='.jpg'):
    name, ext = os.path.splitext(filename)
    if ext.lower() == in_ext:
        name = name.lower()
        path = os.path.join(EXTRA_DIR, filename)
        father = g_pokemon_dict.get(name.split('-')[0])
        if father:

# Path: pokemonterminal/database.py
# class Pokemon:
#     """Class to represent pokemons"""
#     # ID is stored as a string because it must maintain "003" format, not "3".
#     __id = ""
#     __name = ""
#     __region = ""
#     __path = ""  # The location of the image.
#     __pkmn_type = ""
#     __pkmn_type_secondary = ""
#     __dark_threshold = 0.5
# 
#     def __init__(self, identifier, name, region, path, pkmn_type,
#                  pkmn_type_secondary, dark_threshold):
#         self.__id = identifier
#         self.__name = name
#         self.__region = region
#         self.__path = path
#         self.__dark_threshold = float(dark_threshold)
#         self.__pkmn_type = pkmn_type
#         self.__pkmn_type_secondary = pkmn_type_secondary
# 
#     def get_id(self):
#         # Pokemon from folder 'Extra' have no ID.
#         return self.__id or "---"
# 
#     def get_name(self):
#         return self.__name
# 
#     def get_region(self):
#         return self.__region
# 
#     def get_path(self):
#         return self.__path
# 
#     def get_pkmn_type(self):
#         return self.__pkmn_type
# 
#     def get_pkmn_type_secondary(self):
#         return self.__pkmn_type_secondary
# 
#     def get_dark_threshold(self):
#         return self.__dark_threshold
# 
#     def is_extra(self):
#         return self.__id is None
# 
#     def __str__(self):
#         name = self.get_name().title()
#         return self.get_id() + " " + name + " at " + self.get_path()


# Path: tests/load_all_pokemon.py
import collections
import os
from pokemonterminal.database import Pokemon

    assert False, 'region_name_by_id({})'.format(id)


def make_a_pokemon(id, line):
    id = '{:03}'.format(id)
    line = line.strip().split()
    while len(line) < 4:  # add '' as the subtype if it is missing
        line.append('')
    name, threshold, main_type, subtype = line
    name = name.lower()
    threshold = float(threshold)
    region = region_name_by_id(id)
    dir_name = region_dict[region].dir_name
    path = os.path.join(IMAGES_DIR, dir_name, id + '.jpg')
    return Pokemon(id, name, region, path, main_type, subtype, threshold)


def load_pokemon(filename='pokemon.txt'):
    """Load everything but the Pokemon from the 'Extra' folder"""
    with open(os.path.join(DATA_DIR, filename)) as in_file:
        return [make_a_pokemon(i, line) for i, line in enumerate(in_file, 1)]


def make_an_extra_pokemon(filename, in_ext='.jpg'):
    name, ext = os.path.splitext(filename)
    if ext.lower() == in_ext:
        name = name.lower()
        path = os.path.join(EXTRA_DIR, filename)
        father = g_pokemon_dict.get(name.split('-')[0])
        if father:

            return Pokemon(None, name,