mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Moved some methods from QuestData to helper classes, the whole class rearranged
Moved shop-related things to QuestUtilCards.java (eg. number of shop boosters calculation) CardShop now shows how many decks use the given card Quest deck editor: press space to add card to your deck - that simple CardPool no longer allows incorrect remove numbers removed lots of senseless javadocs
This commit is contained in:
@@ -174,7 +174,11 @@ public abstract class Predicate<T> {
|
||||
return new Node<T>(operand1, operator, operand2);
|
||||
}
|
||||
// Predefined operators: and, or
|
||||
public static <T> Predicate<T> and(final Predicate<T> operand1, final Predicate<T> operand2) { return new NodeAnd<T>(operand1, operand2); }
|
||||
public static <T> Predicate<T> and(final Predicate<T> operand1, final Predicate<T> operand2) {
|
||||
if (operand1.is1()) { return operand2; }
|
||||
if (operand2.is1()) { return operand1; }
|
||||
return new NodeAnd<T>(operand1, operand2);
|
||||
}
|
||||
public static <T> Predicate<T> and(final Iterable<Predicate<T>> operand) { return new MultiNodeAnd<T>(operand); }
|
||||
public static <T, U> Predicate<T> and(final Predicate<T> operand1, final Predicate<U> operand2, Lambda1<U, T> bridge) { return new NodeAndBridged<T, U>(operand1, operand2, bridge); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user