* Add some pretty printers to help debugging.
This commit is contained in:
jean.chalard
2009-09-04 13:22:15 +00:00
parent 2a7d6819bb
commit 2e7570fdea
15 changed files with 71 additions and 20 deletions

View File

@@ -108,7 +108,7 @@ void MTGCardInstance::initMTGCI(){
}
const string MTGCardInstance::getDisplayName(){
const string MTGCardInstance::getDisplayName() const {
return getName();
}
@@ -635,3 +635,13 @@ int MTGCardInstance::stepPower(CombatStep step)
if (has(Constants::FIRSTSTRIKE)) return 0; else return MAX(0, power);
}
}
std::ostream& MTGCardInstance::toString(std::ostream& out) const
{
return out << name;
}
std::ostream& operator<<(std::ostream& out, const MTGCardInstance& c)
{
return c.toString(out);
}