Files
wagic/projects/mtg/include/PhaseRing.h
jean.chalard 7214248494 J :
* Some more tweaking for combat.
* This still doesn't work, but it's closer.
2009-09-03 02:16:53 +00:00

36 lines
784 B
C++

#ifndef _PHASERING_H_
#define _PHASERING_H_
#include <list>
using std::list;
/*
The class that handles the phases of a turn
*/
class Player;
typedef enum { BLOCKERS, ORDER, FIRST_STRIKE, DAMAGE } CombatStep;
class Phase{
public:
int id;
Player * player;
Phase(int id, Player *player):id(id),player(player){};
};
class PhaseRing{
public:
list<Phase *> ring;
list<Phase *>::iterator current;
Phase * getCurrentPhase();
Phase * forward();
Phase * goToPhase(int id, Player * player);
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);
};
#endif