Changeset 12145 for code/branches/wagnis_HS18/src/modules
- Timestamp:
- Dec 5, 2018, 10:54:17 AM (6 years ago)
- Location:
- code/branches/wagnis_HS18/src/modules/wagnis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc
r12136 r12145 21 21 this->province_selection_changed = false; 22 22 this->gameStage = NOT_READY; 23 this->reinforcements = 0; 23 24 } 24 25 //Destructor … … 68 69 orxout()<<"Sorry, someone already owns this provice"<<endl; 69 70 } 70 //TODO: Set more troops to provinces before game begins71 71 72 72 break; … … 220 220 } 221 221 222 223 224 //Manages a Players turn225 void WagnisPlayer::playerTurn(){226 227 }228 222 //checks if a move is valid, possible MoveTypes: ATTACK, MOVE, SET_TROOPS, SET_TROOPS_INITIAL 229 223 bool WagnisPlayer::checkMove(MoveType move_type) … … 265 259 return false; 266 260 } 267 268 // 269 void WagnisPlayer::setTroops(WagnisProvince*){ 270 271 } 272 void WagnisPlayer::attack(WagnisProvince*,WagnisProvince*){ 273 274 } 275 void WagnisPlayer::moveTroops(WagnisProvince*,WagnisProvince*){ 276 277 } 261 278 262 //Return a "Player x" String 279 263 std::string WagnisPlayer::toString(){ … … 318 302 } 319 303 320 int WagnisPlayer::best3(int a, int b, int c) 304 int WagnisPlayer::best3(int a, int b, int c) //returns best of 3 integers for attack stage 321 305 { 322 306 if(a >= b && a>= c) … … 328 312 } 329 313 330 int WagnisPlayer::best2(int a, int b) 314 int WagnisPlayer::best2(int a, int b) //returns best of 2 integers for attack stage 331 315 { 332 316 if(a >= b) … … 336 320 } 337 321 338 int WagnisPlayer::second3(int a, int b, int c) 322 int WagnisPlayer::second3(int a, int b, int c) //returns second of 3 integers for attack stage 339 323 { 340 324 if((a >= b && a <= c)||(a <= b && a >= c)) … … 346 330 } 347 331 348 int WagnisPlayer::second2(int a, int b) 332 int WagnisPlayer::second2(int a, int b) //returns second of 2 integers for attack stage 349 333 { 350 334 if(a <= b) … … 353 337 return b; 354 338 } 355 356 int WagnisPlayer::reinforcementCounter() //calculates and sets reeinforcements how many troops a player gets at beginning of his turn357 {358 359 reinforcements = 10;360 orxout()<<"derp"<<endl;361 /*362 int counter = 0;363 364 for (int i = 0; i <= 100; ++i)365 {366 if367 }368 */369 370 }371 339 } -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.h
r12136 r12145 55 55 int second3(int, int, int); 56 56 int second2(int, int); 57 int reinforcementCounter();58 57 }; 59 58 }
Note: See TracChangeset
for help on using the changeset viewer.