public static void main(String[] args) 
  {
    World w = new World();
    
    // create some deer
    int numDeer = 20;
    for (int i = 0; i < numDeer; i++)
    {
      new Deer(w);
    }
    
    // create some wolves
    int numWolves = 5;
    for (int i = 0; i < numWolves; i++)
    {
      new Wolf(w);
    }
    
    // declare a wolf and deer
    Wolf wolf = null;
    Deer deer = null;
    
    // loop for a set number of timesteps
    for (int t = 0; t < 100; t++)
    {
      // loop through all the wolves
      wolf = Wolf.getHead();
      while (wolf != null)
      {
        wolf.act();
        wolf = wolf.getNext();
      }
      
      // loop through all the deer
      deer = Deer.getHead();
      while (deer != null)
      {
        deer.act();
        deer = deer.getNext();
      }
     
      // wait a bit
      try {
        Thread.sleep(1000);
      } catch (Exception ex) {
      }
    }
  }