Examples of tap()


Examples of mage.game.permanent.Permanent.tap()

            Permanent permanent = game.getPermanent(target);
            if (sourcePermanent != null) {
                sourcePermanent.addConnectedCard("DesertersQuarters", permanent.getId());
            }
            if (permanent != null) {            
                permanent.tap(game);
            }
        }
        return true;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.tap()

            if (player != null) {
                for (UUID targetId : source.getTargets().get(0).getTargets()) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
                        if (player.chooseUse(Outcome.Tap, new StringBuilder("Tap ").append(permanent.getName()).append("?").toString(), game)) {
                            permanent.tap(game);
                        } else if (player.chooseUse(Outcome.Untap, new StringBuilder("Untap ").append(permanent.getName()).append("?").toString(), game)) {
                            permanent.untap(game);
                        }
                    }
                }
View Full Code Here

Examples of mage.game.permanent.Permanent.tap()

    public boolean apply(Game game, Ability source) {
        Permanent narcolepsy = game.getPermanent(source.getSourceId());
        if (narcolepsy != null) {
            Permanent enchanted = game.getPermanent(narcolepsy.getAttachedTo());
            if (enchanted != null && !enchanted.isTapped()) {
                enchanted.tap(game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.tap()

    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        int sumPower = 0;
        if (targets.choose(Outcome.Tap, controllerId, sourceId, game)) {
            for (UUID targetId: targets.get(0).getTargets()) {
                Permanent permanent = game.getPermanent(targetId);
                if (permanent != null && permanent.tap(game)) {
                    sumPower += permanent.getPower().getValue();
                }
            }
        }
        game.informPlayers(new StringBuilder("Tap creatures with total power of ").append(sumPower).toString());
View Full Code Here

Examples of mage.game.permanent.Permanent.tap()

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID targetId : this.targetPointer.getTargets(game, source)) {
            Permanent creature = game.getPermanent(targetId);
            if (creature != null) {
                creature.tap(game);
                SkipNextUntapTargetEffect effect = new SkipNextUntapTargetEffect();
                effect.setTargetPointer(new FixedTarget(targetId));
                game.addEffect(effect, source);
            }
        }
View Full Code Here

Examples of mage.game.permanent.Permanent.tap()

                        if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) {
                            targetPermanent.untap(game);
                        }
                    } else {
                        if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) {
                            targetPermanent.tap(game);
                        }
                    }
                    return true;
                }
            }
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAButton.tap()

    } finally {
      UIAButton
          but =
          driver.findElement(
              new AndCriteria(new NameCriteria("Back"), new TypeCriteria(UIAButton.class)));
      but.tap();
    }
  }

}
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAElement.tap()

    }
    UIAElement el =
        driver.findElement(
            new AndCriteria(new TypeCriteria(UIATableCell.class), new NameCriteria("Web",
                MatchingStrategy.starts)));
    el.tap();

    while (driver.getWindowHandles().size() != 2) {
      Thread.sleep(50);
    }
    handles = driver.getWindowHandles();
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAElement.tap()

    Assert.assertEquals(handles.size(), 2);

    UIAElement back = driver
        .findElement(
        new AndCriteria(new TypeCriteria(UIAButton.class), new NameCriteria("Back")));
    back.tap();
    long deadline = System.currentTimeMillis() + 5000;
    while (driver.getWindowHandles().size() != 1) {
      Thread.sleep(50);
      if (System.currentTimeMillis() > deadline) {
        break;
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAElement.tap()

    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);
    UIAElement webCell =
        driver.findElement(new AndCriteria(new TypeCriteria(UIATableCell.class), new NameCriteria(
            "Web", MatchingStrategy.starts)));
    webCell.tap();

    handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 2);
    driver.switchTo().window("Web");
    // TODO fix that server side. Accessing a webview currently loading isn't handled ?
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.