title: Why isn't it rendering more than one of the same object?
body: <p>I am trying to create 10 bricks using a LinkedList and rendered them randomly to the screen. Why isn't it working? I have been trying to figure it out for 3 days now please give me the answer. I'd really appreciate it. Thank you.</p>
  
  <p>Game.java</p>
  
  <pre><code>public class Game{
    private Controller c;
  
    public void init(){
      c = new Controller(this);
    }
  
    public void run(){
      init();
      //gameLoop
    }
  
    public void tick(){
      c.tick();
    }
  
    public void render(){
     c.render(g);
    }
  
  
  
  }
  </code></pre>
  
  <p>Bricks.java</p>
  
  <pre><code>public class Bricks {
  
  private double x, y;
  
  Game game;
  private Image BrickImg;
  
  
  public Bricks(double x, double y, Game game) {
      this.x = x;
      this.y = y;
      this.game = game;
  
      ImageIcon bricksImg = new ImageIcon("res\\bricks.png");
      BrickImg = bricksImg.getImage();
  }
  
  public void tick() {
  
  }
  
  public void render(Graphics g) {
      g.drawImage(BrickImg, (int)x, (int)y, null);
  }
  
  }
  </code></pre>
  
  <p>Controller.java</p>
  
  <pre><code>public class Controller {
  
  
  Game game;
  
  private LinkedList&lt;Bricks&gt; b = new LinkedList&lt;Bricks&gt;();
  
  Bricks TempBricks;
  Random random = new Random();
  
  public Controller(Game game) {
      this.game = game;
  
      for (int i = 0; i &lt; 10; i++) {
          addBrick(new Bricks(random.nextInt(500), 50, game));
      }
  }
  
  public void tick() {
      for (int i = 0; i &lt; b.size(); i++) {
          TempBricks = b.get(i);
      }
  
      TempBricks.tick();
  }
  
  public void render(Graphics g) {
      for (int i = 0; i &lt; b.size(); i++) {
          TempBricks = b.get(i);
      }
  
      TempBricks.render(g);
  }
  
  public void addBrick(Bricks brick) {
      b.add(brick);
  }
  
  public void removeBrick(Bricks brick) {
      b.remove(brick);
  }
  
  }
  </code></pre>