コード例 #1
0
 // 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);
   }
 }
コード例 #2
0
 // Send my most recent new line count to server
 public void updateLines(String playerUsername, int lines) throws NetworkException {
   m_netClient.updateLines(playerUsername, lines);
 }
コード例 #3
0
 public boolean requestReturnFromBazaar(String playerUsername, boolean firstRequest)
     throws NetworkException {
   return m_netClient.requestReturnFromBazaar(playerUsername, firstRequest);
 }
コード例 #4
0
 public void sendBoardUpdate(BoardImageData data) throws NetworkException {
   m_netClient.sendBoardUpdate(data);
 }
コード例 #5
0
 public ArrayList getPlayerRankings() throws NetworkException {
   return m_netClient.getPlayerRankings();
 }
コード例 #6
0
 // Use player's weapon on opponent
 public void useWeapon(String playerUsername, Weapon weapon) throws NetworkException {
   m_netClient.useWeapon(playerUsername, weapon);
 }
コード例 #7
0
 // Let opponent know that game has ended for player
 public void sendGameEnded(String playerUsername) throws NetworkException {
   m_netClient.sendGameEnded(playerUsername);
 }
コード例 #8
0
 public HashSet getPlayerList() throws NetworkException {
   return m_netClient.getPlayerList();
 }
コード例 #9
0
 public void rejectNewGameRequest(String opponentUsernameRequestor) throws NetworkException {
   m_netClient.rejectNewGameRequest(opponentUsernameRequestor);
 }
コード例 #10
0
 public void cancelNewGameRequest(String opponentUsernameRequestee) throws NetworkException {
   m_netClient.cancelNewGameRequest(opponentUsernameRequestee);
 }
コード例 #11
0
 public void requestNewGame(String requestor) throws NetworkException {
   m_netClient.requestNewGame(requestor);
 }
コード例 #12
0
 public void disconnectFromServer() throws NetworkException {
   m_netClient.disconnectFromServer();
 }
コード例 #13
0
 public int connectToServer() throws NetworkException {
   return m_netClient.connectToServer();
 }