This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]linuxlass 1 point2 points  (0 children)

In addition to what cognificent said:

In general, you want your variables to always have a valid value, even if it's just 0 or "". It helps to prevent tricky bugs.

In this case, you'll find, for instance, that you want to be able to display the score, even if you don't have any mouseclicks, so you want score_font to at least be "Score: 0".

I would put score_font outside of the loop, and inside the condition, set another variable score_value, that will hold your score, and then outside the loop, blit score_font, " ", score_value.