I am using Pygame for a programming class and need to recreate a game of tag. I am attempting to pass an if statement when the coordinates of the tagger are within a range of 10 of the player's coordinates. I attempted using 'in range()' within the if statement but it didn't seem to work. Not sure what I was doing wrong.
if (pos[0] == enemypos[0] & pos[1] == enemypos[1]):
font = pygame.font.SysFont('Calibri', 25, True, False)
gameovertext = font.render("You're IT", True, WHITE)
screen.blit(gameovertext, [x_mouse+10, y_mouse+10])