mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
update deck every 5 seconds while constructing or sideboarding
This commit is contained in:
parent
beb2eb8e27
commit
fe79ee97a9
15 changed files with 161 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue