Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public boolean requestReturnFromBazaar(String playerUsername, boolean firstRequest)
     throws NetworkException {
   return m_netClient.requestReturnFromBazaar(playerUsername, firstRequest);
 }
Ejemplo n.º 4
0
 public void sendBoardUpdate(BoardImageData data) throws NetworkException {
   m_netClient.sendBoardUpdate(data);
 }
Ejemplo n.º 5
0
 public ArrayList getPlayerRankings() throws NetworkException {
   return m_netClient.getPlayerRankings();
 }
Ejemplo n.º 6
0
 // Use player's weapon on opponent
 public void useWeapon(String playerUsername, Weapon weapon) throws NetworkException {
   m_netClient.useWeapon(playerUsername, weapon);
 }
Ejemplo n.º 7
0
 // Let opponent know that game has ended for player
 public void sendGameEnded(String playerUsername) throws NetworkException {
   m_netClient.sendGameEnded(playerUsername);
 }
Ejemplo n.º 8
0
 public HashSet getPlayerList() throws NetworkException {
   return m_netClient.getPlayerList();
 }
Ejemplo n.º 9
0
 public void rejectNewGameRequest(String opponentUsernameRequestor) throws NetworkException {
   m_netClient.rejectNewGameRequest(opponentUsernameRequestor);
 }
Ejemplo n.º 10
0
 public void cancelNewGameRequest(String opponentUsernameRequestee) throws NetworkException {
   m_netClient.cancelNewGameRequest(opponentUsernameRequestee);
 }
Ejemplo n.º 11
0
 public void requestNewGame(String requestor) throws NetworkException {
   m_netClient.requestNewGame(requestor);
 }
Ejemplo n.º 12
0
 public void disconnectFromServer() throws NetworkException {
   m_netClient.disconnectFromServer();
 }
Ejemplo n.º 13
0
 public int connectToServer() throws NetworkException {
   return m_netClient.connectToServer();
 }