X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;ds=sidebyside;f=bs%2Fplanet.h;h=78c00b94531305a2a144227f363b604b821b79fe;hb=HEAD;hp=c729ebf6d634e781ac76467d1d416e389f6d6dba;hpb=7b5ccf741883c34b2ac96afe460a3d0eda3701bb;p=hbs.git diff --git a/bs/planet.h b/bs/planet.h index c729ebf..78c00b9 100644 --- a/bs/planet.h +++ b/bs/planet.h @@ -21,6 +21,7 @@ #include "fleet.h" typedef std::map > RoidList; +typedef std::map > > > > ReportList; /**This class is the implementation of a planet. * @@ -43,13 +44,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 +86,13 @@ public: */ void runBattle(std::vector friendly, std::vector hostile); + void calculateScoreLoss(std::vector friendly, int tick = 1); + + float capping(int tick = 0); + void setCapping(float capping, int tick = 0); + + ReportList report() const; + 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 @@ -90,10 +104,12 @@ protected: * \param stealhostile a cointainer used to store all the stole units the * hostile side took this tick. */ - void calcOneTick(Planet* friendly, Fleet* hostile, std::map >& stealfriendly, std::map >& stealhostile, int tick = 0); + void calcOneTick(Planet* friendly, Fleet* hostile, std::map >& stealfriendly, std::map >& stealhostile, int tick = 1); - unsigned m_iScore; + std::vector m_Score; + std::vector m_Capping; RoidList m_Roids; + ReportList m_Report; };