Exemple #1
0
 public void updateTable() {
   tableModel.playerList = nGame.playerList;
   tableModel.fireTableDataChanged();
   tableModel.fireTableStructureChanged();
   if (player.getGame().serverOwner) {
     boolean allready = true;
     if (nGame.playerList.size() == 0) allready = false;
     for (NPlayer pl : nGame.playerList) if (!pl.isReady()) allready = false;
     start.setEnabled(allready);
   }
 }
Exemple #2
0
 /** Verwaltet die Benutzter Butten Actionen */
 @Override
 public void actionPerformed(ActionEvent ae) {
   if (ae.getSource() == this.ready) {
     player.chgready();
   }
   if (ae.getSource() == this.start) {
     player.startNWGame();
   }
   if (ae.getSource() == this.back) {
     player.disconnect();
   }
 }
Exemple #3
0
 public void addlocalPl(NPlayer pl) {
   if (player == null) {
     this.player = pl;
     player.setChatterBox(chat, chatinput);
     main.controller.setPlayer(pl);
     tableModel.fireTableDataChanged();
   }
 }