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

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


      message = handleNewRound(event);
    } else if(we instanceof NewTrickEvent) {
      NewTrickEvent event = (NewTrickEvent) we;
      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) {
View Full Code Here


      listener.handleNewRound(new NewRoundEvent(round));
    } else if(mt.equals(MessageType.NEW_TRICK)) {
      listener.handleNewTrick(new NewTrickEvent());
    } else if(mt.equals(MessageType.NEW_TRUMP)) {
      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)) {
View Full Code Here

      lead = (dealer + 1)% _playerCollection.size();
      gameEventNotifier.notify(new NewRoundEvent(roundId));
      _game.newRound(roundId);
      Round round = _game.getCurrentRound();
      Card trump = dealCards(roundId, dealer, lead);
      gameEventNotifier.notify(new NewTrumpEvent(trump));
      round.setTrump(trump);

      if(trump != null && trump.getValue().equals(Value.WIZARD)) {
        Player trumpPicker = _playerCollection.get(dealer);
        //_logger.info(trumpPicker.getName() + " gets to pick trump.");
        trump = new Card(null, trumpPicker.pickTrump(), -1);
        gameEventNotifier.notify(new NewTrumpEvent(trump));
        round.setTrump(trump);
      }
      int cardsDealt = roundId;
      Bid bid = bid(trump, lead, cardsDealt, round);
      if(go.getBidType().equals(BidType.HIDDEN)) {
View Full Code Here

TOP

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

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.