update deck every 5 seconds while constructing or sideboarding

This commit is contained in:
BetaSteward 2011-09-04 13:23:16 -04:00
parent beb2eb8e27
commit fe79ee97a9
15 changed files with 161 additions and 16 deletions

View file

@ -61,6 +61,7 @@ public interface MageServer {
public boolean joinTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException, GameException;
public boolean joinTournamentTable(String sessionId, UUID roomId, UUID tableId, String name, String playerType, int skill) throws MageException, GameException;
public boolean submitDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
public void updateDeck(String sessionId, UUID tableId, DeckCardLists deckList) throws MageException, GameException;
public boolean watchTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
public void leaveTable(String sessionId, UUID roomId, UUID tableId) throws MageException;
public void swapSeats(String sessionId, UUID roomId, UUID tableId, int seatNum1, int seatNum2) throws MageException;

View file

@ -743,7 +743,23 @@ public class Session {
return false;
}
public boolean concedeGame(UUID gameId) {
public boolean updateDeck(UUID tableId, DeckCardLists deck) {
try {
if (isConnected()) {
server.updateDeck(sessionId, tableId, deck);
return true;
}
} catch (GameException ex) {
handleGameException(ex);
} catch (MageException ex) {
handleMageException(ex);
} catch (Throwable t) {
handleThrowable(t);
}
return false;
}
public boolean concedeGame(UUID gameId) {
try {
if (isConnected()) {
server.concedeGame(gameId, sessionId);