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:
@@ -6,36 +6,52 @@
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
The class that handles the phases of a turn
|
||||
*/
|
||||
The class that handles the phases of a turn
|
||||
*/
|
||||
|
||||
class Player;
|
||||
|
||||
typedef enum { BLOCKERS, TRIGGERS, ORDER, FIRST_STRIKE, END_FIRST_STRIKE, DAMAGE, END_DAMAGE } CombatStep;
|
||||
class Phase{
|
||||
public:
|
||||
int id;
|
||||
Player * player;
|
||||
Phase(int id, Player *player):id(id),player(player){};
|
||||
typedef enum
|
||||
{
|
||||
BLOCKERS,
|
||||
TRIGGERS,
|
||||
ORDER,
|
||||
FIRST_STRIKE,
|
||||
END_FIRST_STRIKE,
|
||||
DAMAGE,
|
||||
END_DAMAGE
|
||||
} CombatStep;
|
||||
|
||||
class Phase
|
||||
{
|
||||
public:
|
||||
int id;
|
||||
Player * player;
|
||||
Phase(int id, Player *player) :
|
||||
id(id), player(player)
|
||||
{
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
class PhaseRing{
|
||||
class PhaseRing
|
||||
{
|
||||
private:
|
||||
static bool extraDamagePhase(int id);
|
||||
public:
|
||||
list<Phase *> ring;
|
||||
list<Phase *>::iterator current;
|
||||
Phase * getCurrentPhase();
|
||||
Phase * forward(bool sendEvents = true);
|
||||
Phase * goToPhase(int id, Player * player,bool sendEvents = true);
|
||||
PhaseRing(Player* players[], int nbPlayers=2);
|
||||
~PhaseRing();
|
||||
int addPhase(Phase * phase);
|
||||
int addPhaseBefore(int id, Player* player,int after_id, Player * after_player, int allOccurences = 1);
|
||||
int removePhase (int id, Player * player, int allOccurences = 1);
|
||||
static const char * phaseName(int id);
|
||||
static int phaseStrToInt(string s);
|
||||
|
||||
static bool extraDamagePhase(int id);
|
||||
public:
|
||||
list<Phase *> ring;
|
||||
list<Phase *>::iterator current;
|
||||
Phase * getCurrentPhase();
|
||||
Phase * forward(bool sendEvents = true);
|
||||
Phase * goToPhase(int id, Player * player, bool sendEvents = true);
|
||||
PhaseRing(Player* players[], int nbPlayers = 2);
|
||||
~PhaseRing();
|
||||
int addPhase(Phase * phase);
|
||||
int addPhaseBefore(int id, Player* player, int after_id, Player * after_player, int allOccurences = 1);
|
||||
int removePhase(int id, Player * player, int allOccurences = 1);
|
||||
static const char * phaseName(int id);
|
||||
static int phaseStrToInt(string s);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user