Re: Magic Data
Well, it took a bit longer, but Magic 2011 is now on Gatherer, together with Archenemy rarities and schemes (but without the promo schemes, it seems).
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=27&t=1347
Because the best way is to keep lists of supertypes, types, and subtypes, just like the comprehensive rules do. Besides, you only need to distinguish between types and supertypes (subtypes are distinct automatically by being on the other side of the dash) and there are only four supertypes (Legendary, Basic, Snow, World), making it actually quite easy to split them all up.BlackMamba wrote:I was wondering why you didn't separate types, subtypes and supertypes?
AFAIK, this information is not available from the xml data (the "position" of the dash"). However, I do understand that there's a limited list of supertypes and types and thus parsing is not hard. I'll work around that (had to do it when parsing oracle text anyway).MageKing17 wrote:Subtypes are distinct automatically by being on the other side of the dash
I wouldn't use an XML file for data anyway, but I guess that's just personal taste.BlackMamba wrote:AFAIK, this information is not available from the xml data (the "position" of the dash").MageKing17 wrote:Subtypes are distinct automatically by being on the other side of the dash
This has already been answered but here's my rationale: The dash was removed since it is not "pure"; meaning it's not something I'd use in a data representation in any of my imaginary future projects. I consider the method already mentioned here superior (knowing supertype, type and figuring out subtypes) as it doesn't rely on meta-data. The dash that is.BlackMamba wrote:I was wondering why you didn't separate types, subtypes and supertypes?
I totally agree! XML is a very verbose, slow to parse format. The reason this data is in XML is because parsers are available for probably every language that anyone might ever think about developing magic applications in. It's also hierarchical which was one of my requirements. JSON was a competitor but lack of support in the java standard library knocked that one out.MageKing17 wrote:I wouldn't use an XML file for data anyway, but I guess that's just personal taste.