super.onCreate(icicle); toJoin = Player.unbundle(getArguments()); Log.d(TAG, "Player id in PasswordFragment: " + toJoin.getId());
public void resetPassed() { for (Player player: this.values()) { player.resetPassed(); } }
@Override public void emptyManaPools() { for (Player player : getPlayers().values()) { player.getManaPool().emptyPool(this); } }
private UUID getNextPlayerInDirection(boolean left, PlayerList playerList, Game game) { UUID nextPlayerId; if (left) { nextPlayerId = playerList.getNext(); } else { nextPlayerId = playerList.getPrevious(); } return nextPlayerId; } }
/** * Check to shuffle library if allowed * * @param player * @param source * @param game */ protected void mayShuffle(Player player, Ability source, Game game) { if (this.mayShuffleAfter && player.chooseUse(Outcome.Benefit, "Shuffle your library?", source, game)) { player.shuffleLibrary(source, game); } }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { return mana.getFirstAvailable(); } }
@Override public void lost(Game game) { if (canLose(game)) { lostForced(game); } }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { if (mana.getWhite() > 0 && ManaType.RED == manaType) { return ManaType.WHITE; } return manaType; }
@Override public void doOpeningHandAction(Card card, Player player, Game game) { player.moveCards(card, Zone.BATTLEFIELD, this, game); } }
/** * Cast e.g. from Karn Liberated to restart the current game * * @param game */ @Override public void init(Game game) { init(game, false); }
@Override public void beginTurn(Game game) { this.landsPlayed = 0; findRange(game); }
@Override public void pass(Game game) { this.passed = true; resetStoredBookmark(game); }
public int count() { int x = 0; for (ManaPoolItem item : manaItems) { x += item.count(); } return x; }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { return mana.getFirstAvailable(); } }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { return mana.getFirstAvailable(); } }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { return mana.getFirstAvailable(); } }
@Override public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { return mana.getFirstAvailable(); } }