def _create_spawn_points(self, raw_map): _xy_list = list() for _n in xrange(self._number_of_spawn_points): xy = None while not xy: x = rnd.get_int(1, self.WIDTH) - 1 y = rnd.get_int(1, self.WIDTH) - 1 if not raw_map[x][y].blocks: raw_map[x][y].update_col(color.get_color(color.PURPLE, 2)) xy = geometry.get_point(x, y) _xy_list.append(xy) return tuple(_xy_list)
def _get_col_attr_value(self): col_code, grade = self._object_data['color'] return get_color(col_code, grade)