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

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


      message = handleNewTrick(event);
    } else if(we instanceof NewTrumpEvent) {
      NewTrumpEvent event = (NewTrumpEvent) we;
      message = handleNewTrump(event);
    } else if(we instanceof PlayerBidEvent) {
      PlayerBidEvent event = (PlayerBidEvent) we;
      message = handlePlayerBid(event);
    } else if(we instanceof PlayerPlayedEvent) {
      PlayerPlayedEvent event = (PlayerPlayedEvent) we;
      message = handlePlayerPlayed(event);
    } else if(we instanceof PlayerWonTrickEvent) {
View Full Code Here


      Card card = getCard(mps);
      listener.handleNewTrump(new NewTrumpEvent(card));
    } else if(mt.equals(MessageType.PLAYER_BID)) {
      int bid = getInt(mps, MessageParamConstants.BID);
      int id = getPlayerId(mps);
      listener.handlePlayerBid(new PlayerBidEvent(id, bid));
    } else if(mt.equals(MessageType.PLAYER_PLAYED)) {
      Card card = getCard(mps);
      int id = getPlayerId(mps);
      listener.handlePlayerPlayed(new PlayerPlayedEvent(id, card));
    } else if(mt.equals(MessageType.PLAYER_WON_TRICK)) {
View Full Code Here

      if(go.getBidType().equals(BidType.STANDARD) ||
        go.getBidType().equals(BidType.EVEN) ||
        go.getBidType().equals(BidType.CANADIAN) ||
        go.getBidType().equals(BidType.HARDCORE)
      ) {
        gameEventNotifier.notify(new PlayerBidEvent(player.getId(), bidInt));
        round.setBid(player.getId(), bidInt);
      }
      playerCount++;
    }
    return bid;
View Full Code Here

      }
      int cardsDealt = roundId;
      Bid bid = bid(trump, lead, cardsDealt, round);
      if(go.getBidType().equals(BidType.HIDDEN)) {
        for(IndividualBid individualBid :bid.getBids()) {
          gameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));
          round.setBid(individualBid.getPlayer().getId(), individualBid.getBid());
        }
      }
      RoundSummary roundSummary = new RoundSummary();
      for (int i = 0; i < roundId; i++) {
        TrickTracker trickTracker = playTrick(trump, lead, round);
        roundSummary.addTrickTracker(trickTracker);
        int playerIdWhoWon = trickTracker.winningPlay().getPlayerId();
        lead = findPlayerIndex(playerIdWhoWon);
      }
      if(go.getBidType().equals(BidType.SECRET)) {
        for(IndividualBid individualBid :bid.getBids()) {
          gameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));
          round.setBid(individualBid.getPlayer().getId(), individualBid.getBid());
        }
      }
      scoreRound(roundSummary, bid, _game);
      this.overallScores.displayScore();
View Full Code Here

TOP

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

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.