Камень ножницы бумага с помощью библиотеки pygame. import pygame import sys import random pygame.init() pygame.display.set_caption("Камень-ножницы-бумага") screen = pygame.display.set_mode((420, 350)) choices = ['камень', 'ножницы', 'бумага'] computer_choice = random.choice(choices) button_rock = pygame.Rect(20, 50, 120, 50) button_scissors = pygame.Rect(150, 50, 120, 50) button_paper = pygame.Rect(280, 50, 120, 50) end_game = False def draw_text(text, font, color, surface, x, y): textobj = font.render(text, 1, color) textrect = textobj.get_rect() textrect.topleft = (x, y) surface.blit(textobj, textrect) def game(): global end_game user_choice = "" result = "" while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.MOUSEBUTTONDOWN: # Определите, на какую кнопку нажал пользователь mouse_pos = event.pos if button_rock.collidepoint(mouse_pos):