Fix bug in scry when scrying entire library

This commit is contained in:
Peter F. Patel-Schneider
2019-01-13 10:25:35 -05:00
parent 087495f5a0
commit 735516e6d5

View File

@@ -741,11 +741,11 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
List<Card> result = getGui().manipulateCardList("Move cards to top or bottom of library", cards, manipulable, topOK, bottomOK, false);
CardCollection toBottom = new CardCollection();
CardCollection toTop = new CardCollection();
for (int i = 0; manipulable.contains(result.get(i)) && i<cards.size(); i++ ) {
for (int i = 0; i<cards.size() && manipulable.contains(result.get(i)) ; i++ ) {
toTop.add(result.get(i));
}
if (toTop.size() < cards.size()) { // the top isn't everything
for (int i = result.size()-1; manipulable.contains(result.get(i)); i-- ) {
for (int i = result.size()-1; i>=0 && manipulable.contains(result.get(i)); i-- ) {
toBottom.add(result.get(i));
}
}