mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Updated readme with actual card stats, added stats printing on mage-verify tests
This commit is contained in:
parent
09e7cb358b
commit
60443cdbfe
2 changed files with 8 additions and 7 deletions
|
@ -152,10 +152,13 @@ public class VerifyCardDataTest {
|
|||
public void checkWrongCardClasses(){
|
||||
Collection<String> errorsList = new ArrayList<>();
|
||||
Map<String, String> classesIndex = new HashMap<>();
|
||||
int totalCards = 0;
|
||||
|
||||
Collection<ExpansionSet> sets = Sets.getInstance().values();
|
||||
for (ExpansionSet set : sets) {
|
||||
for (ExpansionSet.SetCardInfo checkCard : set.getSetCardInfo()) {
|
||||
totalCards = totalCards + 1;
|
||||
|
||||
String currentClass = checkCard.getCardClass().toString();
|
||||
if (classesIndex.containsKey(checkCard.getName())) {
|
||||
String needClass = classesIndex.get(checkCard.getName());
|
||||
|
@ -175,6 +178,9 @@ public class VerifyCardDataTest {
|
|||
System.out.println(error);
|
||||
}
|
||||
|
||||
// unique cards stats
|
||||
System.out.println("Total unique cards: " + classesIndex.size() + ", total non unique cards (reprints): " + totalCards);
|
||||
|
||||
if (errorsList.size() > 0){
|
||||
Assert.fail("DB have wrong card classes, founded errors: " + errorsList.size());
|
||||
}
|
||||
|
@ -205,15 +211,10 @@ public class VerifyCardDataTest {
|
|||
errorsList.add("Warning: total missing sets: " + totalMissingSets + ", with missing cards: " + totalMissingCards);
|
||||
}
|
||||
|
||||
|
||||
// only warnings
|
||||
for (String error: errorsList) {
|
||||
System.out.println(error);
|
||||
}
|
||||
|
||||
if (errorsList.size() > 0){
|
||||
|
||||
//Assert.fail("DB have wrong card classes, founded errors: " + errorsList.size());
|
||||
}
|
||||
}
|
||||
|
||||
private static final Pattern SHORT_JAVA_STRING = Pattern.compile("(?<=\")[A-Z][a-z]+(?=\")");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[![Join the chat at https://gitter.im/magefree/mage](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magefree/mage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/magefree/mage.svg?branch=master)](https://travis-ci.org/magefree/mage)
|
||||
|
||||
XMage allows you to play Magic against one or more online players or computer opponents. It includes full rules enforcement for over **14 000** unique cards (over 27 000 counting all cards from different editions). Starting with *Morningtide*, all regular sets have nearly all the cards implemented ([detailed overview](http://ct-magefree.rhcloud.com/stats)).
|
||||
XMage allows you to play Magic against one or more online players or computer opponents. It includes full rules enforcement for over **16 700** unique cards (over 32 000 counting all cards from different editions). Starting with *Morningtide*, all regular sets have nearly all the cards implemented ([detailed overview](http://ct-magefree.rhcloud.com/stats)).
|
||||
|
||||
There are public servers where you can play XMage against other players. You can also host your own server to play against the AI and/or your friends.
|
||||
|
||||
|
|
Loading…
Reference in a new issue