ConnectionThread c1 = new ConnectionThread("Player 1", BotFactory.TEST, 0, frame1); ConnectionThread c2 = new ConnectionThread("Player 2", BotFactory.HUMAN, 1, frame2);
ConnectionThread c1 = new ConnectionThread("Player 1", BotFactory.TEST, 0); ConnectionThread c2 = new ConnectionThread("Player 2", BotFactory.HUMAN, 1);
  public static void main(String args[]) {   /* Frame frame1 = new Frame() {      public void paintAll(java.awt.Graphics g) {        return;      }      public void repaint() {        return;      }      public void update() {        return;      }      public void setVisible(boolean b) {        super.setVisible(false);      }    };    Frame frame2 = new Frame() {      public void paintAll(java.awt.Graphics g) {        return;      }      public void repaint() {        return;      }      public void update() {        return;      }      public void setVisible(boolean b) {        super.setVisible(false);      }    };*/    Frame frame1 = new Frame();    Frame frame2 = new Frame();    int total1 = 0;    int total2 = 0;    for (int run = 1; run <= 5; run++) {      megamek.server.Server s = new megamek.server.Server("hello", 2348);      ConnectionThread c1 = new ConnectionThread("Player 1", BotFactory.TEST, 0, frame1);      ConnectionThread c2 = new ConnectionThread("Player 2", BotFactory.HUMAN, 1, frame2);      System.gc();      c1.start();      c2.start();      try {        c2.join();        c1.join();      } catch (Exception e) {}      s.die();      total1 += ((BotClientWrapper)c1.result.client).winner;      total2 += ((BotClientWrapper)c2.result.client).winner;      System.out.println("Trial "+run+" "+total1+" "+total2);      System.gc();    }    System.out.println("Player 1: "+total1);    System.out.println("Player 2: "+total2);  }