Bit new to python. I'm making a game where you click on a strawberry, then it reappears in a new location, and so on and so forth. But you see, every time the player misclicks, they lose Score equal to their Crapscore. Their Score is increased by 10 each time they click on the strawb, and the Crapscore is increased by 10 for each time they miss the strawb. But you see, what the on-screen Crapscore says does not equate to exactly how much the player will lose. I want the Crapscore on screen to equal the exact amount of Score they will lose if they misclick. I've tried messing around with different variables, but I can't get it to work.
Crapscore begins at 10, then if the player misclicks, crapscore is increased by 10. Then, the Score is decreased by Crapscore. What shows on screen works, but it's not a code error. I just can't figure out how to make it so that the player's Score is decreased EXACTLY by the player's current Crapscore. Below is the main code with the crapscore and score.
def on_mouse_down(pos):
global crapscore
global score
global hit
global crapscoreonscreen
if strawberry.collidepoint(pos):
score = score + 10
place_strawberry()
hit = True
else:
crapscore = crapscore + 20
score = score - crapscore
place_badshot()
hit = False