1 /***************************************************************************
5 copyright : (C) 2002 by Michael Andreen
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
23 typedef std::map<std::string, std::vector<int> > RoidList;
25 /**This class is the implementation of a planet.
27 * Yes I know.. In real life you wouldn't call a planet a fleet, but this isn't
28 * real life, it's a game engine, and in this engine a planet got all the
29 * attributes that a fleet got + some additions, so I think the inheritance
30 * is fully legal from a OOP standpoint. If it isn't, then please correct me ;)
32 * This class is doing the actual battle simulation (since battles without
33 * planets aren't available in this game).
34 *@author Michael Andreen
37 class Planet : public Fleet {
42 unsigned planetScore() const;
43 void setPlanetScore(unsigned i);
45 int roids(std::string type, int tick = 0) const;
46 void setRoids(std::string type, int number);
48 void runBattle(std::vector<Fleet*> friendly, std::vector<Fleet*> hostile);
51 void calcOneTick(Planet* friendly, Fleet* Hostile, std::map<std::string, std::map<std::string, int> >& stealfriendly, std::map<std::string, std::map<std::string, int> >& stealhostile );