title: How to implement a linked list for a flappy bird program in my class. Now I'm getting errors that "cannot be resolved to a field"
body: <p>I have a model, view, and tube class and I don't know what's going on.</p>
  
  <pre><code>import java.util.Random;
  import java.util.LinkedList;
  import java.util.ListIterator;
  
  class Model
  {
      Bird bird;
      Random r = new Random();
      LinkedList&lt;Tube&gt; tubes;
  
  
      Model() {
  
          this.bird = new Bird();
          this.tubes = new LinkedList&lt;Tube&gt;();
          tubes.add(new Tube(r));
      }
  
      public void update() {
          this.bird.update();
          //this.tube.setPosition();
          //this.tube.update();
          ListIterator&lt;Tube&gt; tIterator = tubes.listIterator();
          while (tIterator.hasNext()){
              System.out.println("Another Tube");
          }
  
      }
  
      public void onClick(int x, int y) {
          this.bird.setDestination();
          this.bird.flap();
      }
  }
  </code></pre>
  
  <p>This class below is where I get the error.</p>
  
  <pre><code>import javax.swing.JPanel;
  import java.awt.Graphics;
  import java.awt.Image;
  import javax.imageio.ImageIO;
  import java.io.IOException;
  import java.awt.Graphics;
  import java.io.File;
  
  class View extends JPanel {
      Model model;
      Image bird_image;
      Image bird_image_flap;
      Image tube_image;
      Image tube_image_down;
  
      View(Model m) throws IOException {
          this.model = m;
          this.bird_image = ImageIO.read(new File("bird1.png"));
          this.bird_image_flap = ImageIO.read(new File("bird2.png"));
          this.tube_image = ImageIO.read(new File("tube_up.png"));
          this.tube_image_down = ImageIO.read(new File("tube_down.png")); 
      }
  
      public void paintComponent(Graphics g) {
  
          if(this.model.bird.flapped){
              g.drawImage(this.bird_image_flap, this.model.bird.x, this.model.bird.y, null);
          } else {
              g.drawImage(this.bird_image, this.model.bird.x, this.model.bird.y, null);
          }   
  
          if(this.model.tubes.isItUp){
              g.drawImage(this.tube_image, this.model.tubes.tube_x, this.model.tubes.tube_y, null);
  
          } else {
              g.drawImage(this.tube_image_down, this.model.tubes.tube_x, this.model.tubes.tube_y - 400, null);
  
          }
  
      }
  }
  </code></pre>
  
  <p>Multiple markers at line 32 down. One is the 'tube cannot be resolved or is not a field'. Another is 'isItUp cannot be resolved or is not a field'
  What am I doing wrong?</p>