congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Player.getPlayableOptions
Code IndexAdd Tabnine to your IDE (free)

How to use
getPlayableOptions
method
in
mage.players.Player

Best Java code snippets using mage.players.Player.getPlayableOptions (Showing top 3 results out of 315)

origin: magefree/mage

public List<Ability> getPlayableOptions(Game game) {
  List<Ability> all = new ArrayList<>();
  List<Ability> playables = getPlayableAbilities(game);
  for (Ability ability: playables) {
    List<Ability> options = game.getPlayer(playerId).getPlayableOptions(ability, game);
    if (options.isEmpty()) {
      if (!ability.getManaCosts().getVariableCosts().isEmpty()) {
        simulateVariableCosts(ability, all, game);
      }
      else {
        all.add(ability);
      }
    }
    else {
      for (Ability option: options) {
        if (!ability.getManaCosts().getVariableCosts().isEmpty()) {
          simulateVariableCosts(option, all, game);
        }
        else {
          all.add(option);
        }
      }
    }
  }
  return all;
}
origin: magefree/mage

protected void simulateOptions(Game game) {
  List<Ability> playables = game.getPlayer(playerId).getPlayable(game, isSimulatedPlayer);
  playables = filterAbilities(game, playables, suggested);
  for (Ability ability : playables) {
    if (ability.getAbilityType() == AbilityType.MANA) {
      continue;
    }
    List<Ability> options = game.getPlayer(playerId).getPlayableOptions(ability, game);
    options = filterOptions(game, options, ability, suggested);
    options = optimizeOptions(game, options, ability);
    if (options.isEmpty()) {
      allActions.add(ability);
    } else {
      for (Ability option : options) {
        allActions.add(option);
      }
    }
  }
}
origin: magefree/mage

List<Ability> playables = game.getPlayer(playerId).getPlayable(game, isSimulatedPlayer);
for (Ability ability: playables) {
  List<Ability> options = game.getPlayer(playerId).getPlayableOptions(ability, game);
  if (options.isEmpty()) {
    if (!ability.getManaCosts().getVariableCosts().isEmpty()) {
mage.playersPlayergetPlayableOptions

Popular methods of Player

  • getId
  • getHand
  • getName
  • getLife
  • getLibrary
  • hasLeft
  • hasWon
  • getCounters
  • hasLost
  • copy
  • damage
  • declareAttacker
  • damage,
  • declareAttacker,
  • getGraveyard,
  • getPlayersUnderYourControl,
  • activateAbility,
  • canLose,
  • choose,
  • declareBlocker,
  • gainLife,
  • getAttachments

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Collectors (java.util.stream)
  • JList (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now