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

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


      message = handlePlayerWonTrick(event);
    } else if(we instanceof ScoreEvent) {
      ScoreEvent event = (ScoreEvent) we;
      message = handleScore(event);
    } else if(we instanceof PlayerNeedsToPlay) {
      PlayerNeedsToPlay event = (PlayerNeedsToPlay) we;
      message = handlePlayerNeedsToPlay(event);
    } else {
      message = null;
    }
View Full Code Here


      int score = getInt(mps, MessageParamConstants.SCORE);
      int id = getPlayerId(mps);
      listener.handleScore(new ScoreEvent(id, score));
    } else if(mt.equals(MessageType.PLAYER_NEEDS_TO_PLAY)) {
      int id = getPlayerId(mps);
      listener.handlePlayerNeedsToPlay(new PlayerNeedsToPlay(id));
    }
  }
View Full Code Here

    TrickTracker trickTracker = new TrickTracker(trump);
    for (Player player: new PlayerIterator(_playerCollection, lead)) {
      Card card = null;
      for (boolean isValid = false; isValid == false;) {
        // need to make sure the card is valid. otherwise repeat
        gameEventNotifier.notify(new PlayerNeedsToPlay(player.getId()));
        card = player.playCard();
        if (ValidityChecker.checkValidity(trickTracker, trump, card, player)) {
          isValid = true;
          gameEventNotifier.notify(new PlayerPlayedEvent(player.getId(), card));
          player.playCardIsValid(card);
View Full Code Here

TOP

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

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.