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:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Filter-like system for determining if a card meats certain criteria, for this and thisforeach autos
|
||||
*/
|
||||
Filter-like system for determining if a card meats certain criteria, for this and thisforeach autos
|
||||
*/
|
||||
|
||||
#ifndef _THISDESCRIPTOR_H_
|
||||
#define _THISDESCRIPTOR_H_
|
||||
@@ -10,91 +10,102 @@
|
||||
#include "MTGCardInstance.h"
|
||||
#include "CardDescriptor.h"
|
||||
|
||||
class ThisDescriptor{
|
||||
public:
|
||||
int comparisonMode;
|
||||
int comparisonCriterion;
|
||||
virtual int match(MTGCardInstance * card) = 0;
|
||||
int matchValue(int value);
|
||||
virtual ~ThisDescriptor();
|
||||
};
|
||||
|
||||
class ThisDescriptorFactory{
|
||||
class ThisDescriptor
|
||||
{
|
||||
public:
|
||||
ThisDescriptor * createThisDescriptor(string s);
|
||||
int comparisonMode;
|
||||
int comparisonCriterion;
|
||||
virtual int match(MTGCardInstance * card) = 0;
|
||||
int matchValue(int value);
|
||||
virtual ~ThisDescriptor();
|
||||
};
|
||||
|
||||
class ThisCounter:public ThisDescriptor{
|
||||
public:
|
||||
Counter * counter;
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
ThisCounter(Counter * _counter);
|
||||
ThisCounter(int power, int toughness, int nb, const char * name);
|
||||
~ThisCounter();
|
||||
class ThisDescriptorFactory
|
||||
{
|
||||
public:
|
||||
ThisDescriptor * createThisDescriptor(string s);
|
||||
};
|
||||
|
||||
class ThisCounterAny:public ThisDescriptor{
|
||||
public:
|
||||
virtual int match(MTGCardInstance *card);
|
||||
|
||||
ThisCounterAny(int nb);
|
||||
};
|
||||
|
||||
class ThisControllerlife:public ThisDescriptor{
|
||||
public:
|
||||
class ThisCounter: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
Counter * counter;
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
|
||||
ThisCounter(Counter * _counter);
|
||||
ThisCounter(int power, int toughness, int nb, const char * name);
|
||||
~ThisCounter();
|
||||
};
|
||||
|
||||
class ThisCounterAny: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance *card);
|
||||
|
||||
ThisCounterAny(int nb);
|
||||
};
|
||||
|
||||
class ThisControllerlife: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
ThisControllerlife(int life);
|
||||
};
|
||||
|
||||
class ThisOpponentlife:public ThisDescriptor{
|
||||
public:
|
||||
class ThisOpponentlife: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
|
||||
ThisOpponentlife(int olife);
|
||||
};
|
||||
|
||||
class ThisEquip:public ThisDescriptor{
|
||||
public:
|
||||
class ThisEquip: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
|
||||
ThisEquip(int equipment);
|
||||
};
|
||||
|
||||
|
||||
class ThisAttacked:public ThisDescriptor{
|
||||
public:
|
||||
class ThisAttacked: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
ThisAttacked(int attack);
|
||||
ThisAttacked(int attack);
|
||||
};
|
||||
|
||||
class ThisNotBlocked:public ThisDescriptor{
|
||||
public:
|
||||
class ThisNotBlocked: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
ThisNotBlocked(int unblocked);
|
||||
ThisNotBlocked(int unblocked);
|
||||
};
|
||||
|
||||
class ThisPower:public ThisDescriptor{
|
||||
public:
|
||||
class ThisPower: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
|
||||
ThisPower(int power);
|
||||
};
|
||||
|
||||
class ThisToughness:public ThisDescriptor{
|
||||
public:
|
||||
class ThisToughness: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
|
||||
|
||||
ThisToughness(int toughness);
|
||||
};
|
||||
|
||||
class ThisX:public ThisDescriptor{
|
||||
public:
|
||||
class ThisX: public ThisDescriptor
|
||||
{
|
||||
public:
|
||||
virtual int match(MTGCardInstance * card);
|
||||
ThisX(int x);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user