title: StackOverflow Error at java.util.AbstractColllection.<init>(Unknown Source)
body: <p>I fixed my prior problem yesterday by just separating all the classes into separate files. Nevertheless, I wrote all the code down and seeing no errors was able to compile the program. Or so I thought. </p>
  
  <p>Here's the error code:</p>
  
  <pre><code>Exception in thread "main" java.lang.StackOverflowError
  at java.util.AbstractCollection.&lt;init&gt;(Unknown Source)
  at java.util.AbstractList.&lt;init&gt;(Unknown Source)
  at java.util.Vector.&lt;init&gt;(Unknown Source)
  at java.util.Vector.&lt;init&gt;(Unknown Source)
  at java.util.Vector.&lt;init&gt;(Unknown Source
  </code></pre>
  
  <p>Here are the spots where my I get the errors(marked with problem?)</p>
  
  <pre><code>public class GameWorld implements IObservable, IGameWorld 
  {
  // create collections class
  public Vector&lt;GameObject&gt; GameObjectList = new Vector&lt;GameObject&gt;(); // PROBLEM
  private Vector&lt;IObserver&gt; ObserverList = new Vector&lt;IObserver&gt;();
      // declare objects
  Tank pTank = new Tank(10, 10);
  // other objects and variables to declare 
  public GameWorld() 
  {
   // add objects to GameObjectList
  }
  // accessors/mutators
  }
  </code></pre>
  
  <p>I get another error here</p>
  
  <pre><code>public class Tank extends Movable implements ISteerable
       {
   private int armorStrength;
   private int missileCount;
   public Tank()
   {}
  
   public Tank(int armStr, int misslCt) // problem?
   {
       armorStrength = armStr; // default armorStrength
       missileCount = misslCt; // default missileCount
   }
   public void setDirection(int direction)
   {
      this.setDirection(direction); // get input from left turn or right turn
      // updateValues();
   }
       // access/mutators here
  </code></pre>
  
  <p>I'm stumped on what to do here.</p>
  
  <p>here's the main code</p>
  
  <pre><code>public class Starter {
  
  public static void main (String args[])
  {
      Game g = new Game();
  
  }
      }
  </code></pre>
  
  <p>which has a Game class that is basically the GUI of the program</p>
  
  <pre><code>public class Game extends JFrame { 
  
   private GameWorld gw; 
   private MapView mv; // new in A2 
   private ScoreView sv; // new in A2 
  </code></pre>
  
  <p>public Game() { </p>
  
  <pre><code> gw = new GameWorld(); // create “Observable” 
   mv = new MapView(); // create an “Observer” for the map 
   sv = new ScoreView(gw); // create an “Observer” for the game state data 
   gw.addObserver(mv); // register the map Observer 
   gw.addObserver(sv); // register the score observer 
  
       // code here to create menus, create Command objects for each command, 
       // add commands to Command menu, create a control panel for the buttons, 
       // add buttons to the control panel, add commands to the buttons, and 
       // add control panel, MapView panel, and ScoreView panel to the frame  
  
  
  
   setVisible(true); 
   } 
       }
  </code></pre>
  
  <p>and has a lot of references to other functions.</p>