Commit initial version of experimental AI simulation code.

It's disabled by default. Set SpellAbilityPicker.USE_SIMULATION = true to enable.

It's nowhere near complete and there are still tons of issues to work out, but it works a lot of the time.
This commit is contained in:
Myrd
2015-01-29 00:27:02 +00:00
parent f083b9055d
commit e22029463d
8 changed files with 610 additions and 1 deletions

View File

@@ -2396,6 +2396,10 @@ public class Card extends GameEntity implements Comparable<Card> {
public Map<Long, CardChangedType> getChangedCardTypes() {
return Collections.unmodifiableMap(changedCardTypes);
}
public Map<Long, KeywordsChange> getChangedCardKeywords() {
return changedCardKeywords;
}
public final void addChangedCardTypes(final CardType addType, final CardType removeType,
final boolean removeSuperTypes, final boolean removeCardTypes, final boolean removeSubTypes,
@@ -6443,4 +6447,18 @@ public class Card extends GameEntity implements Comparable<Card> {
return keywords;
}
}
public void setChangedCardTypes(Map<Long, CardChangedType> changedCardTypes) {
this.changedCardTypes.clear();
for (Entry<Long, CardChangedType> entry : changedCardTypes.entrySet()) {
this.changedCardTypes.put(entry.getKey(), entry.getValue());
}
}
public void setChangedCardKeywords(Map<Long, KeywordsChange> changedCardKeywords) {
this.changedCardKeywords.clear();
for (Entry<Long, KeywordsChange> entry : changedCardKeywords.entrySet()) {
this.changedCardKeywords.put(entry.getKey(), entry.getValue());
}
}
}