import java.util.Random;

public class RunAgents2 {
  public static void main(String[] args) {
    Flight2 flight = new Flight2(1405);
    Thread agent1 = new Agent2("Smith",flight);
    Thread agent2 = new Agent2("Bond",flight);

    agent1.setDaemon(true);
    agent2.setDaemon(true);

    agent1.start();
    agent2.start();

    try{
      Thread.sleep(300);
    } catch (InterruptedException e) {
      System.out.println(e);
    }
    System.out.println("Finished.");
    for (int i = 0; i < 12; i++)
      System.out.println("Seat " + i + " has " + flight.isSeatFree(i) + " occupants.");
  }
}
