title: Making Player Fall On Only Platforms
body: <p>I am trying to create a 2D platformer, and I am about to try and implement jumping. However, I am sort of lost on how to make the player only fall on to platforms. </p>
  
  <p>I was thinking create a new class called Platform, and then create an ArrayList of all the coordinates of all of the platforms in the game.</p>
  
  <p>I then create a while loop, and whenever the player jumps, when he is falling, it continues falling unless he is standing on a platform?</p>
  
  <p>Something like:</p>
  
  <pre><code>while(// This is where you check if the player's y coordinate is above all of the platforms in the game, so WHILE you are above all of the platforms, continue falling.){
  
        playery--;
        repaint();
        // Some kind of wait here
  }
  </code></pre>
  
  <p>Am I taking the correct approach here?
  Am I over complicating it? Is there an easier way of achieving this?</p>