diff --git a/src/main/java/forge/game/player/AIPlayer.java b/src/main/java/forge/game/player/AIPlayer.java index 3e28571a510..abbdacfb89b 100644 --- a/src/main/java/forge/game/player/AIPlayer.java +++ b/src/main/java/forge/game/player/AIPlayer.java @@ -208,50 +208,6 @@ public class AIPlayer extends Player { AllZone.getComputerPlayer().discard(num, sa, false); } - /** {@inheritDoc} */ - @Override - public final void handToLibrary(final int numToLibrary, final String libPosIn) { - final String libPos = libPosIn; - - for (int i = 0; i < numToLibrary; i++) { - int position; - if (libPos.equalsIgnoreCase("Top")) { - position = 0; - } else if (libPos.equalsIgnoreCase("Bottom")) { - position = -1; - } else { - final Random r = MyRandom.getRandom(); - if (r.nextBoolean()) { - position = 0; - } else { - position = -1; - } - } - final CardList hand = AllZone.getComputerPlayer().getCardsIn(ZoneType.Hand); - - CardList blIP = AllZone.getComputerPlayer().getCardsIn(ZoneType.Battlefield); - - blIP = blIP.getType("Basic"); - if (blIP.size() > 5) { - final CardList blIH = hand.getType("Basic"); - if (blIH.size() > 0) { - final Card card = blIH.get(CardUtil.getRandomIndex(blIH)); - - Singletons.getModel().getGameAction().moveToLibrary(card, position); - } else { - CardListUtil.sortAttackLowFirst(hand); - CardListUtil.sortNonFlyingFirst(hand); - - Singletons.getModel().getGameAction().moveToLibrary(hand.get(0), position); - } - } else { - CardListUtil.sortCMC(hand); - - Singletons.getModel().getGameAction().moveToLibrary(hand.get(0), position); - } - } - } - // ///////////////////////// /** {@inheritDoc} */ diff --git a/src/main/java/forge/game/player/HumanPlayer.java b/src/main/java/forge/game/player/HumanPlayer.java index 86c1087af20..6c200953d85 100644 --- a/src/main/java/forge/game/player/HumanPlayer.java +++ b/src/main/java/forge/game/player/HumanPlayer.java @@ -193,24 +193,6 @@ public class HumanPlayer extends Player { AllZone.getInputControl().setInput(PlayerUtil.inputChainsDiscard(), true); } - /** {@inheritDoc} */ - @Override - public final void handToLibrary(final int numToLibrary, String libPos) { - if (libPos.equals("Top") || libPos.equals("Bottom")) { - libPos = libPos.toLowerCase(); - } else { - String s = "card"; - if (numToLibrary > 1) { - s += "s"; - } - - final Object o = GuiUtils.chooseOne("Do you want to put the " + s - + " on the top or bottom of your library?", new Object[] { "top", "bottom" }); - libPos = o.toString(); - } - AllZone.getInputControl().setInput(PlayerUtil.inputPutFromHandToLibrary(libPos, numToLibrary)); - } - /** {@inheritDoc} */ @Override protected final void doScry(final CardList topN, final int n) { diff --git a/src/main/java/forge/game/player/Player.java b/src/main/java/forge/game/player/Player.java index ed9dc9f0f7b..4b0c22470af 100644 --- a/src/main/java/forge/game/player/Player.java +++ b/src/main/java/forge/game/player/Player.java @@ -1721,18 +1721,6 @@ public abstract class Player extends GameEntity { return milled; } - /** - *

- * handToLibrary. - *

- * - * @param numToLibrary - * a int. - * @param libPos - * a {@link java.lang.String} object. - */ - public abstract void handToLibrary(final int numToLibrary, String libPos); - // ////////////////////////////// /** *

@@ -2088,28 +2076,6 @@ public abstract class Player extends GameEntity { */ public abstract void sacrificePermanent(String prompt, CardList choices); - /** - *

- * sacrificeCreature. - *

- */ - public final void sacrificeCreature() { - final CardList choices = AllZoneUtil.getCreaturesInPlay(this); - this.sacrificePermanent("Select a creature to sacrifice.", choices); - } - - /** - *

- * sacrificeCreature. - *

- * - * @param choices - * a {@link forge.CardList} object. - */ - public final void sacrificeCreature(final CardList choices) { - this.sacrificePermanent("Select a creature to sacrifice.", choices); - } - // Game win/loss /** diff --git a/src/main/java/forge/game/player/PlayerUtil.java b/src/main/java/forge/game/player/PlayerUtil.java index 0f5d0696a0d..9b59460a6af 100644 --- a/src/main/java/forge/game/player/PlayerUtil.java +++ b/src/main/java/forge/game/player/PlayerUtil.java @@ -313,58 +313,4 @@ public final class PlayerUtil { return target; } // input_sacrificePermanents() - /** - *

- * input_putFromHandToLibrary. - *

- * - * @param topOrBottom - * a {@link java.lang.String} object. - * @param num - * a int. - * @return a {@link forge.control.input.Input} object. - * @since 1.0.15 - */ - public static Input inputPutFromHandToLibrary(final String topOrBottom, final int num) { - final Input target = new Input() { - private static final long serialVersionUID = 5178077952030689103L; - private int n = 0; - - @Override - public void showMessage() { - CMatchUI.SINGLETON_INSTANCE.showMessage("Select a card to put on the " + topOrBottom + " of your library."); - ButtonUtil.disableAll(); - - if ((this.n == num) || (AllZone.getHumanPlayer().getZone(ZoneType.Hand).size() == 0)) { - this.stop(); - } - } - - @Override - public void selectButtonCancel() { - this.stop(); - } - - @Override - public void selectCard(final Card card, final PlayerZone zone) { - if (zone.is(ZoneType.Hand)) { - int position = 0; - if (topOrBottom.equalsIgnoreCase("bottom")) { - position = -1; - } - - Singletons.getModel().getGameAction().moveToLibrary(card, position); - - this.n++; - if (this.n == num) { - this.stop(); - } - - this.showMessage(); - } - } - }; - return target; - } - } // end class PlayerUtil