Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2018, 11:54:14 AM (5 years ago)
Author:
stadlero
Message:

Game progression finished. still bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc

    r12145 r12150  
    8080                            {
    8181                                this->target_province->setTroops(this->target_province->getTroops()+1);
     82                                this->reinforcements -= 1;
    8283                                orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl;
    8384                            }
     
    8990
    9091                        if (checkMove(ATTACK))
     92                       
    9193                        {
     94                            orxout()<<"Attack move check returned valid"<<endl;
    9295                            while ((this->origin_province->getTroops() > 1) && (this->target_province->getTroops() > 0)) //still troops available
    9396                            {
     
    199202                                this->origin_province->setTroops(1);
    200203                            }
     204                        }else{
     205                            orxout()<<"Attack move check returned false"<<endl;
    201206                        }
    202207                       
     
    337342            return b;   
    338343    }
     344
     345    void WagnisPlayer::setActive(bool b){
     346        this->is_active = b;
     347        if(b == true) orxout()<<"Player "<<this->Player_ID<<"\'s turn"<<endl;
     348    }
     349
     350    bool WagnisPlayer::isActive() const {
     351        return this->is_active;
     352    }
    339353}
Note: See TracChangeset for help on using the changeset viewer.