diff --git a/attributes.py b/attributes.py index ad158f5..3f959e6 100644 --- a/attributes.py +++ b/attributes.py @@ -20,7 +20,8 @@ COLORS = { 'lightgreen': (70, 238, 70), 'red': (255, 0, 0), 'lightblue': (120, 180, 230), - 'iceblue': (186,242,239), + 'iceblue': (186, 242, 239), + 'blue': (0, 0, 255), 'orange': (255, 165, 0) } diff --git a/main.py b/main.py index 683bfd0..adb376e 100644 --- a/main.py +++ b/main.py @@ -81,6 +81,10 @@ class MainGameFrame: package_color = get_package_color(pack) pygame.draw.rect(self.display, package_color, ((pack_x * TILE_WIDTH) + 3, (pack_y * TILE_HEIGHT) + 3, TILE_WIDTH - 5, TILE_HEIGHT - 5)) + if pack.category == "freezed": + pygame.draw.rect(self.display, COLORS['blue'], + ((pack_x * TILE_WIDTH) + 2, (pack_y * TILE_HEIGHT) + 2, TILE_WIDTH - 4, + TILE_HEIGHT - 4), 3) def draw_nums(self): for row in self.warehouse_map.tiles: diff --git a/warehouse.py b/warehouse.py index d618d90..64d99a5 100644 --- a/warehouse.py +++ b/warehouse.py @@ -195,6 +195,9 @@ class Warehouse: pack_x, pack_y = self._set_package_position() package_field = self.tiles[pack_x][pack_y] new_package = Pack(lays_on_field=package_field) + categ_seed = random.random() + if categ_seed > 0.8: + new_package.category = "freezed" new_package.size = random.randrange(1, 10) if package_field.category.name in self.storage_types: package_field.capacity -= new_package.size