else if (callback.getMethod().equals("gameOver")) {
session.getGame().modalMessage((String) callback.getData());
session.getGame().hideGame();
}
else if (callback.getMethod().equals("gameAsk")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().ask(message.getMessage(), message.getGameView());
}
else if (callback.getMethod().equals("gameTarget")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().pickTarget(message.getMessage(), message.getCardsView(), message.getGameView(), message.getTargets(), message.isFlag());
}
else if (callback.getMethod().equals("gameSelect")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().select(message.getMessage(), message.getGameView());
}
else if (callback.getMethod().equals("gameChooseAbility")) {
session.getGame().pickAbility((AbilityPickerView) callback.getData());
}
else if (callback.getMethod().equals("gameChoose")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().getChoice(message.getMessage(), message.getStrings());
}
else if (callback.getMethod().equals("gamePlayMana")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().playMana(message.getMessage(), message.getGameView());
}
else if (callback.getMethod().equals("gamePlayXMana")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().playXMana(message.getMessage(), message.getGameView());
}
else if (callback.getMethod().equals("gameSelectAmount")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().getAmount(message.getMin(), message.getMax(), message.getMessage());
}
else if (callback.getMethod().equals("gameReveal")) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().revealCards(message.getMessage(), message.getCardsView());
}
else if (callback.getMethod().equals("gameUpdate")) {
session.getGame().updateGame((GameView) callback.getData());
}
else if (callback.getMethod().equals("gameInform")) {
if (callback.getMessageId() > messageId) {
GameClientMessage message = (GameClientMessage) callback.getData();
session.getGame().inform(message.getMessage(), message.getGameView());
}
else {
logger.warning("message out of sequence - ignoring");
}
}