// Update opponent on my changed stats public void playerUpdate(int lines, int points, int funds, PlayerInfo playerInfo) throws NetworkException { // If PlayerInfo is not me, don't send- why would we update // our opponent about herself? if (playerInfo.getUsername() == this.m_info.getUsername()) { // Only send here // First param is ignored m_netClient.playerUpdate(lines, points, funds, playerInfo); } }
// Send my most recent new line count to server public void updateLines(String playerUsername, int lines) throws NetworkException { m_netClient.updateLines(playerUsername, lines); }
public boolean requestReturnFromBazaar(String playerUsername, boolean firstRequest) throws NetworkException { return m_netClient.requestReturnFromBazaar(playerUsername, firstRequest); }
public void sendBoardUpdate(BoardImageData data) throws NetworkException { m_netClient.sendBoardUpdate(data); }
public ArrayList getPlayerRankings() throws NetworkException { return m_netClient.getPlayerRankings(); }
// Use player's weapon on opponent public void useWeapon(String playerUsername, Weapon weapon) throws NetworkException { m_netClient.useWeapon(playerUsername, weapon); }
// Let opponent know that game has ended for player public void sendGameEnded(String playerUsername) throws NetworkException { m_netClient.sendGameEnded(playerUsername); }
public HashSet getPlayerList() throws NetworkException { return m_netClient.getPlayerList(); }
public void rejectNewGameRequest(String opponentUsernameRequestor) throws NetworkException { m_netClient.rejectNewGameRequest(opponentUsernameRequestor); }
public void cancelNewGameRequest(String opponentUsernameRequestee) throws NetworkException { m_netClient.cancelNewGameRequest(opponentUsernameRequestee); }
public void requestNewGame(String requestor) throws NetworkException { m_netClient.requestNewGame(requestor); }
public void disconnectFromServer() throws NetworkException { m_netClient.disconnectFromServer(); }
public int connectToServer() throws NetworkException { return m_netClient.connectToServer(); }