No code change just reformatting of header files.

finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
   * Any empty virtual declarations were kept to one line.  
   * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
This commit is contained in:
techdragon.nguyen@gmail.com
2011-01-21 18:01:14 +00:00
parent 6d3d4c1792
commit e53c16f700
101 changed files with 6128 additions and 4684 deletions
+105 -85
View File
@@ -9,143 +9,163 @@ class TargetChooser;
class MTGCardInstance;
class MTGAbility;
class ExtraCost{
class ExtraCost
{
public:
TargetChooser * tc;
MTGCardInstance * source;
MTGCardInstance * target;
std::string mCostRenderString;
TargetChooser * tc;
MTGCardInstance * source;
MTGCardInstance * target;
std::string mCostRenderString;
ExtraCost(const std::string& inCostRenderString, TargetChooser *_tc = NULL);
virtual ~ExtraCost();
virtual int setPayment(MTGCardInstance * card);
virtual int isPaymentSet() { return (target != NULL); }
virtual int canPay() { return 1; }
virtual int doPay() = 0;
virtual void Render();
virtual int setSource(MTGCardInstance * _source);
virtual ExtraCost* clone() const = 0;
ExtraCost(const std::string& inCostRenderString, TargetChooser *_tc = NULL);
virtual ~ExtraCost();
virtual int setPayment(MTGCardInstance * card);
virtual int isPaymentSet()
{
return (target != NULL);
}
virtual int canPay()
{
return 1;
}
virtual int doPay() = 0;
virtual void Render();
virtual int setSource(MTGCardInstance * _source);
virtual ExtraCost* clone() const = 0;
};
class ExtraCosts{
class ExtraCosts
{
public:
vector<ExtraCost *>costs;
MTGCardInstance * source;
MTGAbility * action;
ExtraCosts();
~ExtraCosts();
void Render();
int tryToSetPayment(MTGCardInstance * card);
int isPaymentSet();
int canPay();
int doPay();
int reset();
int setAction(MTGAbility * _action, MTGCardInstance * _source);
void Dump();
ExtraCosts * clone() const;
vector<ExtraCost *> costs;
MTGCardInstance * source;
MTGAbility * action;
ExtraCosts();
~ExtraCosts();
void Render();
int tryToSetPayment(MTGCardInstance * card);
int isPaymentSet();
int canPay();
int doPay();
int reset();
int setAction(MTGAbility * _action, MTGCardInstance * _source);
void Dump();
ExtraCosts * clone() const;
};
class SacrificeCost: public ExtraCost{
class SacrificeCost: public ExtraCost
{
public:
SacrificeCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual SacrificeCost * clone() const;
SacrificeCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual SacrificeCost * clone() const;
};
//life cost
class LifeCost: public ExtraCost{
class LifeCost: public ExtraCost
{
public:
LifeCost(TargetChooser *_tc = NULL);
LifeCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual LifeCost * clone() const;
virtual int doPay();
virtual LifeCost * clone() const;
};
//Discard a random card cost
class DiscardRandomCost: public ExtraCost{
class DiscardRandomCost: public ExtraCost
{
public:
DiscardRandomCost(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int doPay();
virtual DiscardRandomCost * clone() const;
DiscardRandomCost(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int doPay();
virtual DiscardRandomCost * clone() const;
};
//a choosen discard
class DiscardCost: public ExtraCost{
class DiscardCost: public ExtraCost
{
public:
DiscardCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual DiscardCost * clone() const;
DiscardCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual DiscardCost * clone() const;
};
//tolibrary cost
class ToLibraryCost: public ExtraCost{
class ToLibraryCost: public ExtraCost
{
public:
ToLibraryCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual ToLibraryCost * clone() const;
ToLibraryCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual ToLibraryCost * clone() const;
};
//Millyourself cost
class MillCost: public ExtraCost{
class MillCost: public ExtraCost
{
public:
MillCost(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int doPay();
virtual MillCost * clone() const;
MillCost(TargetChooser *_tc = NULL);
virtual int canPay();
virtual int doPay();
virtual MillCost * clone() const;
};
//Mill to exile yourself cost
class MillExileCost: public MillCost{
class MillExileCost: public MillCost
{
public:
MillExileCost(TargetChooser *_tc = NULL);
virtual int doPay();
MillExileCost(TargetChooser *_tc = NULL);
virtual int doPay();
};
//tap other cost
class TapTargetCost: public ExtraCost{
class TapTargetCost: public ExtraCost
{
public:
TapTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual TapTargetCost * clone() const;
TapTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual TapTargetCost * clone() const;
};
//exile as cost
class ExileTargetCost: public ExtraCost{
class ExileTargetCost: public ExtraCost
{
public:
ExileTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual ExileTargetCost * clone() const;
ExileTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual ExileTargetCost * clone() const;
};
//bounce cost
class BounceTargetCost: public ExtraCost{
class BounceTargetCost: public ExtraCost
{
public:
BounceTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual BounceTargetCost * clone() const;
BounceTargetCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual BounceTargetCost * clone() const;
};
//bounce cost
class Ninja: public ExtraCost{
class Ninja: public ExtraCost
{
public:
Ninja(TargetChooser *_tc = NULL);
virtual int isPaymentSet();
virtual int doPay();
virtual Ninja * clone() const;
Ninja(TargetChooser *_tc = NULL);
virtual int isPaymentSet();
virtual int doPay();
virtual Ninja * clone() const;
};
class CounterCost: public ExtraCost{
class CounterCost: public ExtraCost
{
public:
Counter * counter;
int hasCounters;
CounterCost(Counter * _counter,TargetChooser *_tc = NULL);
~CounterCost();
virtual int setPayment(MTGCardInstance * card);
virtual int isPaymentSet();
virtual int canPay();
virtual int doPay();
virtual CounterCost * clone() const;
Counter * counter;
int hasCounters;
CounterCost(Counter * _counter, TargetChooser *_tc = NULL);
~CounterCost();
virtual int setPayment(MTGCardInstance * card);
virtual int isPaymentSet();
virtual int canPay();
virtual int doPay();
virtual CounterCost * clone() const;
};
#endif