Changeset 12172 for code/branches
- Timestamp:
- Dec 7, 2018, 7:51:28 PM (6 years ago)
- Location:
- code/branches/wagnis_HS18/src/modules/wagnis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.cc
r12170 r12172 17 17 this->active_player = 1; 18 18 this->initial_reinforcements_left = 2; //changed here 19 this->empty_provinces_left = 0; 20 21 int n = 3; 19 20 int n = 6; 22 21 for(int i = 0;i < n;i++){ 23 22 WagnisPlayer* p = new WagnisPlayer(context); … … 43 42 44 43 this->gameStage = CHOOSE_PROVINCE_STAGE; 45 this->empty_provinces_left = this->provinceCount();46 44 this->players.at(0)->gameStage = this->gameStage; 47 45 this->players.at(0)->setActive(true); … … 73 71 case CHOOSE_PROVINCE_STAGE:{ 74 72 player->setActive(false); 75 this->empty_provinces_left -= 1; 76 if(this->empty_provinces_left > 0){ 73 if(this->unoccupiedProvinces() > 0){ 77 74 //Still empty provinces left 78 orxout()<<"DEBUG: Empty provs: "<<this->empty_provinces_left<<endl;79 75 80 76 if(this->active_player < this->players.size()){ … … 91 87 }else{ 92 88 //no empty provinces left 93 orxout()<<"DEBUG: Empty provs: "<<this->empty_provinces_left<<endl;94 89 this->active_player = 1; 95 90 WagnisPlayer* next = this->players[this->active_player - 1]; … … 222 217 } 223 218 219 int Wagnis::unoccupiedProvinces(){ 220 int n = 0; 221 for(WagnisProvince* p: this->gameBoard->provs){ 222 if(p != nullptr){ 223 if(p->getOwner_ID() == -1 && p->ID < 1000){ 224 n++; 225 } 226 } 227 } 228 return n; 229 } 230 224 231 int Wagnis::reinforcementsCounter(int player){ 225 232 int n = 0; -
code/branches/wagnis_HS18/src/modules/wagnis/Wagnis.h
r12170 r12172 46 46 int active_player; 47 47 int initial_reinforcements_left; 48 int empty_provinces_left;49 48 GameStage gameStage; 50 49 std::vector<WagnisPlayer*> players; … … 54 53 int reinforcementsCounter(int); 55 54 int getContinentValue(int); 55 int unoccupiedProvinces(); 56 56 }; 57 57 } -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisHUDinfo.cc
r12163 r12172 61 61 case 5: setColour( colour({255,0,255}, 100.0f) ); 62 62 break; 63 case 6: setColour( colour({ 128,128,0}, 40.0f) );63 case 6: setColour( colour({0,255,255}, 40.0f) ); 64 64 break; 65 case 7: setColour( colour({ 0,255,255}, 100.0f) );65 case 7: setColour( colour({128,128,0}, 100.0f) ); 66 66 break; 67 67 case 8: setColour( colour({153,255,204}, 100.0f) ); -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
r12170 r12172 62 62 case 5: this->setRadarObjectColour( colour({255,0,255}, 100.0f) ); 63 63 break; 64 case 6: this->setRadarObjectColour( colour({ 128,128,0}, 40.0f) );64 case 6: this->setRadarObjectColour( colour({0,255,255}, 100.0f) ); 65 65 break; 66 case 7: this->setRadarObjectColour( colour({ 0,255,255}, 100.0f) );66 case 7: this->setRadarObjectColour( colour({128,128,0}, 100.0f) ); 67 67 break; 68 68 case 8: this->setRadarObjectColour( colour({153,255,204}, 100.0f) );
Note: See TracChangeset
for help on using the changeset viewer.