/** * called to set output message * * @param message message */ public void setMessage(String message) { this.message = message; setChanged(); notifyObservers(message); if (GlobalConfig.isServerMode()) { clientsCommunicator.displayMessage(message); } }
/** * called to display whole field * * @param field connect4 field */ public void setField(char[][] field) { this.field = field; setChanged(); notifyObservers(field); if (GlobalConfig.isServerMode()) { clientsCommunicator.displayField(field); } }
/** * called to request players move * * @param playerInterface player */ public void setPlayerMoveRequestMessage(PlayerInterface playerInterface) { this.playerInterface = playerInterface; if (GlobalConfig.isServerMode()) { clientsCommunicator.displayUserMoveRequested( (Player) playerInterface, playerInterface.getName() + "'s move: "); } setChanged(); notifyObservers(playerInterface); }