forked from External/mage
fixed issue 103 - this should catch most card logic errors, log the error on the server and trigger a message on the client
This commit is contained in:
parent
29865e79af
commit
82654f10d5
7 changed files with 44 additions and 5 deletions
|
|
@ -117,6 +117,9 @@ public class GameController implements GameCallback {
|
|||
case REVEAL:
|
||||
revealCards(event.getMessage(), event.getCards());
|
||||
break;
|
||||
case ERROR:
|
||||
error(event.getMessage());
|
||||
break;
|
||||
}
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("Table event listener error ", ex);
|
||||
|
|
@ -416,6 +419,12 @@ public class GameController implements GameCallback {
|
|||
}
|
||||
}
|
||||
|
||||
private void error(String message) {
|
||||
for (final Entry<UUID, GameSession> entry: gameSessions.entrySet()) {
|
||||
entry.getValue().gameError(message);
|
||||
}
|
||||
}
|
||||
|
||||
private GameView getGameView() {
|
||||
return new GameView(game.getState(), game);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue