예제 #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);
   }
 }
예제 #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();
   }
 }
예제 #3
0
 public void addlocalPl(NPlayer pl) {
   if (player == null) {
     this.player = pl;
     player.setChatterBox(chat, chatinput);
     main.controller.setPlayer(pl);
     tableModel.fireTableDataChanged();
   }
 }