mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Improved reconnect and tournament handling. Reconnect time is now shown for disconneted players on player list and tournament panel. You can now reconnect (during 3 minutes) to a tournament also if meanwhile new game (after sideboarding ended) or round was started. Conceding the complete match in a tournament can no longer result in a draw, if you won games before. Quitting a tournament does now always end all active games of that quitting player.
This commit is contained in:
parent
c76529bf91
commit
9ff5bcbd92
29 changed files with 282 additions and 109 deletions
|
|
@ -50,7 +50,8 @@ public interface MageServer {
|
|||
// connection methods
|
||||
boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException;
|
||||
boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
||||
void deregisterClient(String sessionId) throws MageException;
|
||||
// Not used
|
||||
// void deregisterClient(String sessionId) throws MageException;
|
||||
|
||||
// update methods
|
||||
List<ExpansionInfo> getMissingExpansionData(List<String> codes);
|
||||
|
|
|
|||
|
|
@ -48,9 +48,11 @@ public class TournamentPlayerView implements Serializable, Comparable{
|
|||
TournamentPlayerView(TournamentPlayer player) {
|
||||
this.name = player.getPlayer().getName();
|
||||
StringBuilder sb = new StringBuilder(player.getState().toString());
|
||||
if (!player.getStateInfo().isEmpty()) {
|
||||
sb.append(" (").append(player.getStateInfo()).append(")");
|
||||
String stateInfo = player.getStateInfo();
|
||||
if (!stateInfo.isEmpty()) {
|
||||
sb.append(" (").append(stateInfo).append(")");
|
||||
}
|
||||
sb.append(player.getDisconnectInfo());
|
||||
this.state = sb.toString();
|
||||
this.points = player.getPoints();
|
||||
this.results = player.getResults();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue