def spawn_rat(self): x, y = self.gen_rat_starting_pos() rat = Rat(self.size, x, y, self.topological_map, self.rat_lifetime, self.initial_rat_energy) self.location_matrix[x][y].append(rat) self.plot_matrix[x, y] = self.rat_color_index self.rat_list.append(rat)