Erwan - updated VC++ project, fixed a compilation bug with TestSuite

This commit is contained in:
wagic.the.homebrew
2009-01-06 13:20:13 +00:00
parent 8a29171c47
commit f8c96737e8
2 changed files with 18 additions and 15 deletions

View File

@@ -70,7 +70,7 @@ int TestSuiteAI::Act(float dt){
}
if (action.compare("eot")== 0){
if (g->getCurrentGamePhase() != MTG_PHASE_CLEANUP) suite->currentAction--;
if (g->getCurrentGamePhase() != Constants::MTG_PHASE_CLEANUP) suite->currentAction--;
g->userRequestNextGamePhase();
}
else if (action.compare("next")==0){
@@ -187,7 +187,6 @@ string TestSuite::getNextAction(){
MTGPlayerCards * TestSuite::buildDeck(MTGAllCards * collection, int playerId){
char buf[4096];
int list[100];
int nbcards = 0;
for (int j = 0; j < 4; j++){
@@ -357,18 +356,18 @@ int TestSuite::loadNext(){
//TODO PArses a string and gives phase numer
int TestSuite::phaseStrToInt(string s){
if (s.compare("untap") == 0) return MTG_PHASE_UNTAP;
if (s.compare("upkeep") == 0)return MTG_PHASE_UPKEEP;
if (s.compare("draw") == 0)return MTG_PHASE_DRAW;
if (s.compare("firstmain") == 0)return MTG_PHASE_FIRSTMAIN;
if (s.compare("combatbegin") == 0)return MTG_PHASE_COMBATBEGIN;
if (s.compare("combatattackers") == 0)return MTG_PHASE_COMBATATTACKERS;
if (s.compare("combatblockers") == 0)return MTG_PHASE_COMBATBLOCKERS;
if (s.compare("combatdamage") == 0)return MTG_PHASE_COMBATDAMAGE;
if (s.compare("combatend") == 0)return MTG_PHASE_COMBATEND;
if (s.compare("secondmain") == 0)return MTG_PHASE_SECONDMAIN;
if (s.compare("endofturn") == 0)return MTG_PHASE_ENDOFTURN;
if (s.compare("cleanup") == 0)return MTG_PHASE_CLEANUP;
if (s.compare("untap") == 0) return Constants::MTG_PHASE_UNTAP;
if (s.compare("upkeep") == 0)return Constants::MTG_PHASE_UPKEEP;
if (s.compare("draw") == 0)return Constants::MTG_PHASE_DRAW;
if (s.compare("firstmain") == 0)return Constants::MTG_PHASE_FIRSTMAIN;
if (s.compare("combatbegin") == 0)return Constants::MTG_PHASE_COMBATBEGIN;
if (s.compare("combatattackers") == 0)return Constants::MTG_PHASE_COMBATATTACKERS;
if (s.compare("combatblockers") == 0)return Constants::MTG_PHASE_COMBATBLOCKERS;
if (s.compare("combatdamage") == 0)return Constants::MTG_PHASE_COMBATDAMAGE;
if (s.compare("combatend") == 0)return Constants::MTG_PHASE_COMBATEND;
if (s.compare("secondmain") == 0)return Constants::MTG_PHASE_SECONDMAIN;
if (s.compare("endofturn") == 0)return Constants::MTG_PHASE_ENDOFTURN;
if (s.compare("cleanup") == 0)return Constants::MTG_PHASE_CLEANUP;
return -1;
}
@@ -404,7 +403,7 @@ void TestSuite::cleanup(){
}
void TestSuite::load(const char * _filename){
char filename[4096];
char filename[50096];
sprintf(filename, RESPATH"/test/%s", _filename);
std::ifstream file(filename);
std::string s;

View File

@@ -392,6 +392,10 @@
RelativePath=".\src\MTGDeck.cpp"
>
</File>
<File
RelativePath=".\src\MTGDefinitions.cpp"
>
</File>
<File
RelativePath=".\src\MTGGamePhase.cpp"
>