Time to finish our code and beta test each other's games!
An auto clicker power-up will click the cookie for us, cool! Let’s set its variable to 0 because we don’t want it clicking until we buy it form the store.
auto_clicker = 0
Now update all store3 instances like in the video.
Let’s code what happens when the auto clicker is activated.
if auto_click != 0:
clicks += store3.bonus
In Python, the syntax for coding does not equal is !=.
We have to check to see if we’re buying the auto clicker upgrade.
if s.name == "auto"':
auto_click += s.bonus
s.bonus *= 2
That’s it! Run your game, see how it works, then share your game with others.
Username or Email Address
Registration confirmation will be emailed to you.