mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
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
|
|
@ -151,6 +151,7 @@ public interface Game extends MageItem, Serializable {
|
|||
void informPlayer(Player player, String message);
|
||||
void debugMessage(String message);
|
||||
void fireErrorEvent(String message, Exception ex);
|
||||
void fireGameEndInfo();
|
||||
|
||||
//game event methods
|
||||
void fireEvent(GameEvent event);
|
||||
|
|
|
|||
|
|
@ -1551,6 +1551,15 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
tableEventSource.fireTableEvent(EventType.UPDATE, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireGameEndInfo() {
|
||||
if (simulation) {
|
||||
return;
|
||||
}
|
||||
logger.trace("fireGameEndIfo");
|
||||
tableEventSource.fireTableEvent(EventType.END_GAME_INFO, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireErrorEvent(String message, Exception ex) {
|
||||
tableEventSource.fireTableEvent(EventType.ERROR, message, ex, this);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import mage.game.tournament.TournamentPairing;
|
|||
public class TableEvent extends EventObject implements ExternalEvent, Serializable {
|
||||
|
||||
public enum EventType {
|
||||
UPDATE, INFO, STATUS, REVEAL, LOOK, START_DRAFT, START_MATCH, SIDEBOARD, CONSTRUCT, SUBMIT_DECK, END, ERROR,
|
||||
UPDATE, INFO, STATUS, START_DRAFT, START_MATCH, SIDEBOARD, CONSTRUCT, SUBMIT_DECK, END, END_GAME_INFO, ERROR,
|
||||
INIT_TIMER, RESUME_TIMER, PAUSE_TIMER
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ public abstract class MatchImpl implements Match {
|
|||
}
|
||||
}
|
||||
}
|
||||
game.fireGameEndInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue