Package com.svanloon.game.wizard.client.event

Examples of com.svanloon.game.wizard.client.event.GameOverEvent


   * @return Message
   */
  public Message createMessage(WizardEvent we) {
    Message message;
    if(we instanceof GameOverEvent) {
      GameOverEvent event = (GameOverEvent) we;
      message = handleGameOver(event);
    }else if(we instanceof HandDealtEvent) {
      HandDealtEvent event = (HandDealtEvent) we;
      message = handleHandDealt(event);
    }else if(we instanceof NewGameEvent) {
View Full Code Here


    _logger.info("got " + mt);
    List<MessageParam> mps = message.getMsgParams();
    if(mt.equals(MessageType.GAME_OVER)) {
      Collection<String> playerNames = getPlayerNames(mps);
      Collection<Integer> ids = getPlayerIds(mps);
      listener.handleGameOver(new GameOverEvent(ids, playerNames));
    } else if(mt.equals(MessageType.HAND_DEALT)) {
      int id = getPlayerId(mps);
      listener.handleHandDealt(new HandDealtEvent(id));
    } else if(mt.equals(MessageType.NEW_GAME)) {
      List<String> playerNames = getPlayerNames(mps);
View Full Code Here

    Collection<Integer> winningPlayerIds = calcWinningIds();
    Collection<String> winningPlayers = getPlayerNames(winningPlayerIds);
    for(int winningIds:winningPlayerIds) {
      _game.addWinner(winningIds);
    }
    gameEventNotifier.notify(new GameOverEvent(winningPlayerIds, winningPlayers));
  }
View Full Code Here

TOP

Related Classes of com.svanloon.game.wizard.client.event.GameOverEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.