mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Fixed possible duplication in TwoPiles AI.
This commit is contained in:
@@ -112,14 +112,13 @@ public class TwoPilesEffect extends SpellAbilityEffect {
|
|||||||
for (Card c : pool) {
|
for (Card c : pool) {
|
||||||
if (c.getCMC() >= biggest.getCMC()) {
|
if (c.getCMC() >= biggest.getCMC()) {
|
||||||
biggest = c;
|
biggest = c;
|
||||||
}
|
} else if (c.getCMC() <= smallest.getCMC()) {
|
||||||
if (c.getCMC() <= smallest.getCMC()) {
|
|
||||||
smallest = c;
|
smallest = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pile1.add(biggest);
|
pile1.add(biggest);
|
||||||
|
|
||||||
if (size > 3) {
|
if (size > 3 && !pile1.contains(smallest)) {
|
||||||
pile1.add(smallest);
|
pile1.add(smallest);
|
||||||
}
|
}
|
||||||
for (Card c : pool) {
|
for (Card c : pool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user