Package org.ggp.base.player

Examples of org.ggp.base.player.GamePlayer


      if (chosenGamerClass == null) {
        System.out.println("Could not find player class with that name. Available choices are: " + Arrays.toString(availableGamers.toArray()));
        return;
      }
      Gamer gamer = (Gamer) chosenGamerClass.newInstance();
    new GamePlayer(port, gamer).start();
  }
View Full Code Here


          configPanel = gamer.getConfigPanel();

          gamer.addObserver(matchPanel);
          gamer.addObserver(detailPanel);

          GamePlayer player = new GamePlayer(port, gamer);
          player.addObserver(networkPanel);
          player.start();

          JTabbedPane tab = new JTabbedPane();
          tab.addTab("Match", matchPanel);
          tab.addTab("Network", networkPanel);
          tab.addTab("Configuration", configPanel);
          tab.addTab("Detail", detailPanel);
          playersTabbedPane.addTab(type + " (" + player.getGamerPort() + ")", tab);
          playersTabbedPane.setSelectedIndex(playersTabbedPane.getTabCount()-1);

          defaultPort++;
          portTextField.setText(defaultPort.toString());
        }
View Full Code Here

        this.add(gamePanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 5, 5));

        // Start up the gamers!
        try {
            theHumanGamer = new KioskGamer(theGUIPanel);
            theHumanPlayer = new GamePlayer(DEFAULT_HUMAN_PORT, theHumanGamer);
            theHumanPlayer.start();
        } catch(Exception e) {
            e.printStackTrace();
        }
View Full Code Here

                    if(!playerComboBox.getSelectedItem().equals(remotePlayerString)) {
                        Class<?> gamerClass = gamers.get(playerComboBox.getSelectedIndex());
                        try {
                            gamer = (Gamer) gamerClass.newInstance();
                        } catch(Exception ex) { throw new RuntimeException(ex); }
                        theComputerPlayer = new GamePlayer(DEFAULT_COMPUTER_PORT, gamer);
                        theComputerPlayer.start();
                        System.out.println("Kiosk has started a gamer named " + theComputerPlayer.getGamer().getName() + ".");
                    }
                }
View Full Code Here

TOP

Related Classes of org.ggp.base.player.GamePlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.