My code is:
keys = pygame.key.get_pressed()
if keys[pygame.K_1]:
if money >= worker_cost:
money -= worker_cost
workers += 1
worker_cost = round(worker_cost*1.1, 2)
So I am trying to make a game in pygame, but when I put this in to detect when the user wants to buy something, it won't detect that I pressed anything. I have tried putting print commands inside the if loop to see if the loop starts, but it doesn't. Any tips would be appreciated