0

I have a simple game with chefs that throws pizzas and let us catch them. For every caught pizza, player is getting 10 points. My task is to make it tougher, so I decided to add a Chef every 100 points.

In other topic I found a solution for something similar, but it's not working for me:

for i in range(points):
    if i % 100 == 0:
        games.screen.add(Chef(self))

It adds a Chef every time I catch pizza (and amount of points rises) instead of every 100 points.

Mr. Chris
  • 35
  • 5
  • 2
    Why the `for`? Should you just use `if points % 100 == 0:` ? – 0stone0 May 20 '22 at 15:49
  • When I was trying it in different place, without `for` loop it wasn't even running, so after few hours, when I found solution that doesn't create error (but just don't work properly), I didn't even think of removing it - for loop was still in my head as not crashing solution. Tired mind don't see simple things and as I'm very new in this I don't see these things automatically I guess. Thank you :) – Mr. Chris May 20 '22 at 16:07

0 Answers0