- Reverting r30101 (breaks Echo).

This commit is contained in:
Agetian
2015-09-26 04:20:13 +00:00
parent 0a7286fbd9
commit e92e205a5c

View File

@@ -155,7 +155,7 @@ public final class CardUtil {
* @return a CardCollection that matches the given criteria
*/
public static CardCollection getThisTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
return getThisTurnEntered(to, from, valid, src, true);
return getThisTurnEntered(to, from, valid, src, false);
}
/**
@@ -193,29 +193,15 @@ public final class CardUtil {
* @return a CardCollection that matches the given criteria
*/
public static CardCollection getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
return getLastTurnEntered(to, from, valid, src, true);
}
/**
* getLastTurnEntered.
*
* @param to zone going to
* @param from zone coming from
* @param valid a isValid expression
* @param src a Card object
* @param checkLatestState a boolean, true if the latest state of the card as it left the original zone needs to be checked
* @return a CardCollection that matches the given criteria
*/
public static CardCollection getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final boolean checkLatestState) {
CardCollection res = new CardCollection();
final Game game = src.getGame();
if (to != ZoneType.Stack) {
for (Player p : game.getPlayers()) {
res.addAll(p.getZone(to).getCardsAddedLastTurn(from, checkLatestState));
res.addAll(p.getZone(to).getCardsAddedLastTurn(from));
}
}
else {
res.addAll(game.getStackZone().getCardsAddedLastTurn(from, checkLatestState));
res.addAll(game.getStackZone().getCardsAddedLastTurn(from));
}
res = CardLists.getValidCards(res, valid, src.getController(), src);
return res;