подскажите как их количество увеличить.
import pygame from random import randrange WIDTH, HEIGHT = 1400, 700 fps = 60 # fly settings fly_w = 20 fly_h = 20 fly_speed = 15 fly = pygame.Rect(WIDTH//2 - fly_w // 2, HEIGHT - fly_h - 10, fly_w, fly_h) # spider settings spider_wh = 20 spider_speed = 6 sc = pygame.display.set_mode((WIDTH, HEIGHT)) clock = pygame.time.Clock() # images img = pygame.image.load('1.jpg').convert() img2 = pygame.image.load('2.jpg').convert() # colors aqua = (0, 255, 255) # морская волна black = (0, 0, 0) # черный blue = (0, 0, 255) # синий fuchsia = (255, 0, 255) # фуксия gray = (128, 128, 128) # серый green = (0, 128, 0) # зеленый lime = (0, 255, 0) # цвет лайма maroon = (128, 0, 0) # темно-бордовый navy_blue = (0, 0, 128) # темно-синий olive = (128, 128, 0) # оливковый purple = (128, 0, 128) # фиолетовый red = (255, 0, 0) # красный silver = (192, 192, 192) # серебряный teal = (0, 128, 128) # зелено-голубой white = (255, 255, 255) # белый yellow = (255, 255, 0) # желтый def keys(c): pygame.font.init() pygame.display.flip() # sc.fill(pygame.Color('blue')) p1 = pygame.font.SysFont('Arial', 30) text1 = p1.render('press f to pay respect', True, white) sc.blit(text1, (10, 60)) p2 = pygame.font.SysFont('Arial', 30) text2 = p2.render('press space to play', True, white) sc.blit(text2, (10, 10)) p3 = pygame.font.SysFont('Arial', 30) text3 = p3.render('press esc to exit', True, white) sc.blit(text3, (10, 110)) c = pygame.key.get_pressed() return c def play(fps): spider = pygame.Rect(randrange(spider_wh, WIDTH - spider_wh), (randrange(spider_wh, HEIGHT-spider_wh)), spider_wh, spider_wh) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: exit() sc.fill(pygame.Color('BLACK')) # drawing world pygame.draw.rect(sc, pygame.Color('cyan'), fly) pygame.draw.rect(sc, pygame.Color('red'), spider) if spider.centerx < fly.centerx: spider.x += spider_speed if spider.centery < fly.centery: spider.y += spider_speed if spider.centerx > fly.centerx: spider.x -= spider_speed if spider.centery > fly.centery: spider.y -= spider_speed # win, game over if spider.colliderect(fly): sc.blit(img2, (0, 0)) keys(0) return False # control key = pygame.key.get_pressed() if key[pygame.K_LEFT] and fly.left > 0+fly_w: fly.left -= fly_speed if key[pygame.K_RIGHT] and fly.right < WIDTH-fly_w: fly.right += fly_speed if key[pygame.K_UP] and fly.top > 0+fly_h: fly.top -= fly_speed if key[pygame.K_DOWN] and fly.bottom < HEIGHT-fly_h: fly.bottom += fly_speed # update screen pygame.display.flip() clock.tick(fps) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: exit() v = keys(0) if v[pygame.K_SPACE]: play(60) if v[pygame.K_f]: sc.blit(img, (0, 0)) if v[pygame.K_ESCAPE]: exit()