title: I cant get my player to Jump, even thought the code is very similar to a working example
body: <p>I've been learning how to use pygame and came across a tutorial for making your character jump. The code isn't exactly the same, but I don't see why it shouldn't work.</p>
  
  <p>I'm wondering why he would make the jump count <code>False</code> initially if he was going to ask:</p>
  
  <pre><code>if not (p1jump):
      if keys[pygame.K_SPACE]:
          p1jump = True
  </code></pre>
  
  <p>This is confusing to me because <code>p1jump</code> is false initially. So you're basically asking: if p1jump is true, and SPACE is pressed, then set p1jump to true.</p>
  
  <p>Here's the whole class just in case:</p>
  
  <pre><code>class Player1():
      def __init__(self,x,y):
          self.x = x
          self.y = y
          self.height = 25
          self.width = 25
          self.speed = 5
      def draw(self,r,g,b):
          pygame.draw.rect(win,(r,g,b),(self.x,self.y, self.width ,self.height))
      def movement(self):
          p1jump = False
          jumpcount = False
          keys = pygame.key.get_pressed()
  
          if keys[pygame.K_a] and self.x &gt; self.speed:
              self.x -= self.speed
          elif keys[pygame.K_d] and self.x &lt; (w - self.width):
              self.x += self.speed
  
          if not(p1jump):
              if keys[pygame.K_SPACE]:
                  p1jump = True
          else:
              if jumpcount &gt;= -10:
                  self.y -= (jumpcount **2) *0.5
                  jumpcount = 1
  
              else:
                  p1jump = False
                  jumpcount = 10
  </code></pre>
  
  <p>Also, if you guys have any better ways to code a jump please let me know! Thank you!</p>