public void addClient(ClientHandler handler) { // TODO Auto-generated method stub handler.registerObserver(this); clientList.add(handler); ThreadManager.getInstance().execute(handler); System.out.println("Ilosc klientow: " + clientList.size()); }
@Override public void sendGameEnd() { for (ClientHandler handler : clientList) handler.sendGameEnd(); }
@Override public void sendMsg(String msg) { // TODO Auto-generated method stub for (ClientHandler handler : clientList) handler.sendMsg(msg); }
@Override public void sendCurrentRound(int i) { // TODO Auto-generated method stub for (ClientHandler handler : clientList) handler.sendCurrentRound(i); }
@Override public void changePawn(Player p) { // TODO Auto-generated method stub for (ClientHandler handler : clientList) handler.sendPawn(p); }
@Override public void joinPlayer(Player player) { // TODO Auto-generated method stub for (ClientHandler handler : clientList) handler.addPlayer(player); }