Files
wagic/projects/mtg/src/MTGSpellStack.cpp
T
wagic.the.homebrew d45e3b101b
2008-11-02 09:50:16 +00:00

20 lines
332 B
C++

#include "MTGSpellStack.h"
MTGSpellStack::MTGSpellStack(){
cursor = -1;
}
void MTGSpellStack::addSpell(Ability * ability){
cursor++;
spellStack[cursor] ability;
}
int MTGSpellStack::resolve(){
if (cursor < 0)
return 0;
int result = cursor;
cursor--;
(spellStack[cursor + 1])->resolve();
return (result+1);
}