protected void callMessageReceived(CallMessage msg) { try { Phase phase = game.getPhase(); logger.debug("Delegating {} on phase {}", msg.getMethod(), phase.getClass().getSimpleName()); msg.call(phase, ClientIF.class); phase = game.getPhase(); // new phase can differ from the phase in prev msg.call !!! while (phase != null && !phase.isEntered()) { logger.debug("Entering phase {}", phase.getClass().getSimpleName()); phase.setEntered(true); phase.enter(); phase = game.getPhase(); game.fireGameEvent().phaseEntered(phase); } } catch (InvocationTargetException ie) { logger.error(ie.getMessage(), ie.getCause()); } catch (Exception e) { logger.error(e.getMessage(), e); } }