title: Why does my cooldown not work in python/pygame?
body: <p>I have this shooter cooldown, and it should go up to 10 and reset, but just continues forever. Anyone know why?</p>
  
  <pre><code>def update(self):
      keystate = pygame.key.get_pressed()
  
      print(self.cooldown)
  
      if self.cooldown &gt; 0:
          self.cooldown += 1
      elif self.cooldown &gt;= 10:
          self.cooldown = 0
  
      if keystate[pygame.K_SPACE] and self.cooldown == 0:
          self.shoot()
          self.cooldown = 1
  </code></pre>
  
  <p>Thanks</p>