forked from External/mage
Added a game end dialog, that shows the result of the finished game.
This commit is contained in:
parent
19726268ff
commit
ae44981cfa
19 changed files with 922 additions and 4 deletions
|
|
@ -36,6 +36,7 @@ import java.util.concurrent.ScheduledFuture;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import mage.cards.Cards;
|
||||
import mage.game.Game;
|
||||
import mage.game.match.Match;
|
||||
import mage.interfaces.callback.ClientCallback;
|
||||
import mage.players.Player;
|
||||
import mage.players.net.UserData;
|
||||
|
|
@ -160,6 +161,15 @@ public class GameSession extends GameWatcher {
|
|||
}
|
||||
}
|
||||
|
||||
public void endGameInfo(Match match) {
|
||||
if (!killed) {
|
||||
User user = UserManager.getInstance().getUser(userId);
|
||||
if (user != null) {
|
||||
user.fireCallback(new ClientCallback("endGameInfo", game.getId(), getGameEndView(playerId, match)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void setupTimeout() {
|
||||
if (!useTimeout) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue