X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fplanet.h;h=486bd60f50191fe185af5e34132bf51ab34e5b63;hp=c729ebf6d634e781ac76467d1d416e389f6d6dba;hb=bb4169deef42f91b6afa4c4561f9339fba040f01;hpb=3f7ef4493164c1570a0dd6aa3c91de433b29d1d0 diff --git a/bs/planet.h b/bs/planet.h index c729ebf..486bd60 100644 --- a/bs/planet.h +++ b/bs/planet.h @@ -43,13 +43,19 @@ public: * \returns the score as an unsigned int. * \todo add a param to specify what tick to use. */ - unsigned planetScore() const; + unsigned planetScore(int tick = 0) const; /** Sets the score for the current fleet. * \param score this param is a unsigned int holding the score * \todo add a param to specify what tick to use. */ - void setPlanetScore(unsigned score); + void setPlanetScore(unsigned score, int tick = 0); + + /** Adds score to the current fleet. + * \param score this param is a unsigned int holding the score + * \todo add a param to specify what tick to use. + */ + void addPlanetScore(unsigned score, int tick = 0); /** This function is used to get the number of roids of a specific type. * \param type the for this roid (for pa: metal, crystal, eonium, uninit) @@ -79,6 +85,8 @@ public: */ void runBattle(std::vector friendly, std::vector hostile); + void calculateScoreLoss(std::vector friendly, int tick = 1); + protected: /** This function is used to start the calculations of a single tick of the * battle on the current planet. It's protected because it's not really meant @@ -92,7 +100,7 @@ protected: */ void calcOneTick(Planet* friendly, Fleet* hostile, std::map >& stealfriendly, std::map >& stealhostile, int tick = 0); - unsigned m_iScore; + std::vector m_Score; RoidList m_Roids; };