Package cero.games

Examples of cero.games.ActionEvent


          return false;
        }
      }
      ActionLookAtZone action = new ActionLookAtZone();
      try {
        action.playerActed(new ActionEvent(CommandLineLauncher
            .getGame(), CommandLineLauncher.getCurrentPlayer(),
            zone, null, null));
      } catch (ActionException e) {
        e.printStackTrace();
      }
View Full Code Here


      ActionPlayACard action = new ActionPlayACard();
      ArrayList<Card> colcards = new ArrayList<Card>();
      colcards.add(playedcard);

      try {
        action.playerActed(new ActionEvent(game, player, from, to,
            colcards));
        game.registerAction(action);
      } catch (ActionException e) {
        // there shouldn't be any problem here !
        e.printStackTrace();
View Full Code Here

        Zone from = game.getZones().get("Stock");
        Zone to = player.getZones().get("Hand");

        ActionPick action = new ActionPick();
        try {
          action.playerActed(new ActionEvent(game, player, from, to,
              null));
          game.registerAction(action);

        } catch (ActionException e) {
          // there shouldn't be any problem here !
View Full Code Here

     * Action made when we skip our turn.
     */
    private void skipTurn() {
      ActionSkipTurn action = new ActionSkipTurn();
      try {
        action.playerActed(new ActionEvent(game, player, null, null,
            null));
        game.registerAction(action);
      } catch (ActionException e) {
        // there shouldn't be any problem here !
        e.printStackTrace();
View Full Code Here

     * sound for each action.
     *
     * @param action the Action
     */
    public void onExecuted(Action action) {
      ActionEvent event = action.getEvent();

      deck.repaint();
     
      for ( GraphicsZone gZone : deck.getGraphicsZoneList() )
        gZone.setSelected(false);
     
      for ( Zone zone : action.getGame().getPlayers().getSortedList().get(0).getZones() )
        deck.getGZone(zone).setSelected(true);

      // quand on joue une carte
      if (action instanceof ActionPlayACard) {
        if (!event.getPlayer().equals(player))
          if (event.getCards() != null)
            for (Card card : event.getCards()) {
              SoundManager.playSound(new WaveSound("wav/cards/"
                  + card.getCardName() + ".wav", false));
              if (card.getCardName().equals("Joker")
                  || card.getCardName().equals("+4"))
                sayAskedColor();
View Full Code Here

TOP

Related Classes of cero.games.ActionEvent

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.