Exemplo n.º 1
0
  private void runSession() {
    while (true) {
      shell = arseGUI.open(display);
      initializeARSE();
      while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) display.sleep();
      }

      if (gameMasterMode) {
        gameMasterSession = new GameMasterSession(display);
        gameMasterSession.open();

        gameMasterMode = false;
      } else if (playerMode) {
        playerLoginGUI = new PlayerLoginGUI();
        playerSession = new PlayerSession(display);
        shell = playerLoginGUI.open(display);
        initializePlayerLoginGUI();
        while (!shell.isDisposed()) {
          if (!display.readAndDispatch()) display.sleep();
        }

        if (playerSession.loggedIn()) {
          playerSession.open();
        }
        playerMode = false;
      } else break;
    }
  }
Exemplo n.º 2
0
 public static void main(String[] args) {
   Display display = new Display();
   Session session = new Session(display);
   session.runSession();
   display.dispose();
 }