Type fuzzy matching in its current form is to complicated and not very accurate in some cases.
It needs an overhaul to better match types and handle compound types.
Example:
Artifact Creature would return Creature, but in this case Artifact should take president overCreature` for a smaller sample size.
Also Creature is way to dominate in the decision for type fuzzy matching currently.
Refactoring into a class based structure would be idea.
Consulting Magic's type rules and statistics would be helpful for this to better improve the accuracy of the matching.
Type fuzzy matching in its current form is to complicated and not very accurate in some cases. It needs an overhaul to better match types and handle compound types.
Example:
Artifact Creature
would returnCreature
, but in this caseArtifact should take president over
Creature` for a smaller sample size.Also
Creature
is way to dominate in the decision for type fuzzy matching currently.Refactoring into a
class
based structure would be idea.Consulting Magic's type rules and statistics would be helpful for this to better improve the accuracy of the matching.
Files: https://github.com/dills122/MTG-Card-Analyzer/blob/master/src/fuzzy-matching/match-type.js
https://github.com/dills122/MTG-Card-Analyzer/blob/master/src/fuzzy-matching/type-mapping.js