mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Fixed DeckGenerator that included rated cards that didn't fit chosen colors.
This commit is contained in:
parent
b2d9c3b344
commit
168c8dc294
1 changed files with 5 additions and 5 deletions
|
|
@ -346,7 +346,7 @@ public class DeckGenerator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
return -10;
|
return -30;
|
||||||
}
|
}
|
||||||
Integer typeCount = singleCount.get(symbol);
|
Integer typeCount = singleCount.get(symbol);
|
||||||
if (typeCount == null) {
|
if (typeCount == null) {
|
||||||
|
|
@ -378,7 +378,7 @@ public class DeckGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
/*for (Card card : CardsStorage.getAllCards()) {
|
for (Card card : CardsStorage.getAllCards()) {
|
||||||
System.out.println(card.getName());
|
System.out.println(card.getName());
|
||||||
System.out.print(" ");
|
System.out.print(" ");
|
||||||
for (String symbol : card.getManaCost().getSymbols()) {
|
for (String symbol : card.getManaCost().getSymbols()) {
|
||||||
|
|
@ -387,16 +387,16 @@ public class DeckGenerator {
|
||||||
}
|
}
|
||||||
System.out.println(CardUtil.isBasicLand(card));
|
System.out.println(CardUtil.isBasicLand(card));
|
||||||
List<ColoredManaSymbol> allowedColors = new ArrayList<ColoredManaSymbol>();
|
List<ColoredManaSymbol> allowedColors = new ArrayList<ColoredManaSymbol>();
|
||||||
allowedColors.add(ColoredManaSymbol.lookup('W'));
|
allowedColors.add(ColoredManaSymbol.lookup('B'));
|
||||||
allowedColors.add(ColoredManaSymbol.lookup('G'));
|
allowedColors.add(ColoredManaSymbol.lookup('G'));
|
||||||
DeckGenerator.MageScoredCard m = new DeckGenerator.MageScoredCard(card, allowedColors);
|
DeckGenerator.MageScoredCard m = new DeckGenerator.MageScoredCard(card, allowedColors);
|
||||||
|
|
||||||
System.out.println();
|
System.out.println();
|
||||||
System.out.println(" score: " + m.getScore());
|
System.out.println(" score: " + m.getScore());
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
System.out.println("Done! Path: " + generateDeck());
|
//System.out.println("Done! Path: " + generateDeck());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue