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