Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ho no man, Virus detected!

(+1)

i can tell you there is no virus

the code is python 

import pygame

import sys

import math

import random

pygame.init()

screen = pygame.display.set_mode((1280, 720))

circle_pos = (1280/2, 720/2)

font = pygame.font.Font(None, 30)

score = 0

def check_circle_collision() -> bool:

    mouse_pos = pygame.mouse.get_pos()

    if math.sqrt((mouse_pos[0] - circle_pos[0]) **2 +(mouse_pos[1] - circle_pos[1])**2) <= 50:

        return True

    return False

while True:

    events = pygame.event.get()

    for event in events:

        if event.type == pygame.QUIT:

            pygame.quit()

            sys.exit()

        if event.type == pygame.MOUSEBUTTONDOWN:

            if event.button == 1:

                if check_circle_collision():

                    score += 1

                    circle_pos = (random.randint(0, 1280),random.randint(0,720))

    screen.fill("black")

    pygame.draw.circle(screen, "orange", circle_pos, 50)

    score_suffice = font.render(f"score: {score}", True, "red")

    screen.blit(score_suffice, (10, 10))  # Add this line to draw the score text

    message = font.render("Oh no, I lost all my Pumpkins! Can you find them?", True, "red")

    screen.blit(message, (10,40))  # Adjust position as needed

    pygame.display.update()

tks, i will try it again