home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch18 / multi / sample.java < prev    next >
Encoding:
Java Source  |  1997-02-21  |  634 b   |  23 lines

  1. package multi;
  2.  
  3. import java.io.*;
  4. import java.util.*;
  5.  
  6. public class sample {
  7.     public static void main(String[] args)
  8.             throws IOException, ConnectionRefusedException {
  9.         World world = new World(args[0], Integer.parseInt(args[1]));
  10.         while (true) {
  11.             for (Enumeration en = world.getEntities(); en.hasMoreElements();) {
  12.                 Entity e = (Entity) en.nextElement();
  13.                 if (e != null)
  14.                     if (e.hasChanged()) {
  15.                         e.dump();
  16.                         e.markUnchanged();
  17.                     }
  18.             }
  19.         }
  20.     }
  21. }
  22.  
  23.