Package cero.games.base

Examples of cero.games.base.ActionPlayYourCards.playerActed()


    // play the top card of the talon zone
    Collection<Card> cards = new ArrayList<Card>();
    cards.add(stockZone.getTopCard());
    ActionPlayYourCards act = new ActionPlayACard();
    try {
      act.playerActed(new ActionEvent(game, game.getPlayers()
          .getSortedList().get(0), game.getStock(), game.getTalon(),
          cards));
    } catch (ActionException ex) {
      ex.printStackTrace();
    }
View Full Code Here


  private void playTopStockCard(Game game) {
    ActionPlayYourCards act = new ActionPlayACard();
    Collection<Card> cards = new ArrayList<Card>();
    cards.add(getZones().get("stock").getSortedList().get(0));
    try {
      act.playerActed(new ActionEvent(game, this,
          getZones().get("stock"), getZones().get("current"), cards));
    } catch (ActionException e) {
      e.printStackTrace();
    }
    game.registerAction(act);
View Full Code Here

              }
            }
          }
          cards.add(card);
          try {
            action.playerActed(new ActionEvent(game,
                CommandLineLauncher.getCurrentPlayer(), from,
                to, cards));
          } catch (ActionException e) {
            System.out.println("error during playing cards");
          }
View Full Code Here

    if (c != null) {
      Collection<Card> cards = new ArrayList<Card>();
      cards.add(c);
      ActionPlayYourCards act = new ActionPlayACard();
      try {
        act.playerActed(new ActionEvent(g, this, getHand(), g.getTalon(), cards));
        g.registerAction(act);
        return true;
      } catch (ActionException e) {
        e.printStackTrace();
        return false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.