X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bs%2Fplanet.h;h=2d513618342c26c44253178712b3bea0cfabbcd7;hb=a2ce63f561d091d9c3af49987d74849f9450c16b;hp=5e2b13a40f6e6fc53a3427fa0d55b73ef188b643;hpb=595e711e719a6e6b675b1f40e3e141cd9b770fd9;p=hbs.git diff --git a/bs/planet.h b/bs/planet.h index 5e2b13a..2d51361 100644 --- a/bs/planet.h +++ b/bs/planet.h @@ -20,7 +20,7 @@ #include "fleet.h" -typedef std::map RoidList; +typedef std::map > RoidList; /**This class is the implementation of a planet. * @@ -28,6 +28,9 @@ typedef std::map RoidList; * real life, it's a game engine, and in this engine a planet got all the * attributes that a fleet got + some additions, so I think the inheritance * is fully legal from a OOP standpoint. If it isn't, then please correct me ;) + * + * This class is doing the actual battle simulation (since battles without + * planets aren't available in this game). *@author Michael Andreen */ @@ -42,7 +45,11 @@ public: int roids(std::string type, int tick = 0) const; void setRoids(std::string type, int number); + void runBattle(std::vector friendly, std::vector hostile); + protected: + void calcOneTick(Planet* friendly, Fleet* Hostile, std::map >& stealfriendly, std::map >& stealhostile ); + unsigned m_iScore; RoidList m_Roids;