mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
FCollection: can't inherit from Set anymore because the interfaces might colide
This commit is contained in:
@@ -680,7 +680,7 @@ public class GameAction {
|
||||
}
|
||||
|
||||
public final void checkStaticAbilities() {
|
||||
checkStaticAbilities(true, new CardCollection());
|
||||
checkStaticAbilities(true, Sets.<Card>newHashSet());
|
||||
}
|
||||
public final void checkStaticAbilities(final boolean runEvents, final Set<Card> affectedCards) {
|
||||
if (isCheckingStaticAbilitiesOnHold()) {
|
||||
|
||||
@@ -179,7 +179,7 @@ public class AttackConstraints {
|
||||
|
||||
// Now try all others (plus empty attack) and count their violations
|
||||
final FCollection<Map<Card, GameEntity>> legalAttackers = collectLegalAttackers(reqs, myMax);
|
||||
possible.putAll(Maps.asMap(legalAttackers, FN_COUNT_VIOLATIONS));
|
||||
possible.putAll(Maps.asMap(legalAttackers.asSet(), FN_COUNT_VIOLATIONS));
|
||||
possible.put(Collections.<Card, GameEntity>emptyMap(), countViolations(Collections.<Card, GameEntity>emptyMap()));
|
||||
|
||||
// take the case with the fewest violations
|
||||
@@ -260,7 +260,7 @@ public class AttackConstraints {
|
||||
}
|
||||
|
||||
for (final Predicate<Card> predicateRestriction : predicateRestrictions) {
|
||||
if (Iterables.any(Sets.union(myAttackers.keySet(), reserved), predicateRestriction)) {
|
||||
if (Iterables.any(Sets.union(myAttackers.keySet(), reserved.asSet()), predicateRestriction)) {
|
||||
// predicate fulfilled already, ignore!
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ public class Combat {
|
||||
}
|
||||
|
||||
public final Map<Card, GameEntity> getAttackersAndDefenders() {
|
||||
return Maps.asMap(getAttackers(), new Function<Card, GameEntity>() {
|
||||
return Maps.asMap(getAttackers().asSet(), new Function<Card, GameEntity>() {
|
||||
@Override
|
||||
public GameEntity apply(final Card attacker) {
|
||||
return getDefenderByAttacker(attacker);
|
||||
|
||||
Reference in New Issue
Block a user