using namespace std;
+//Static variables
+map<string, vector<int> > Fleet::s_Races;
+map<string, UnitType > Fleet::s_Units;
+
Fleet::Fleet()
{
}
bool Fleet::setRace(std::string sRace)
{
m_sRace = sRace;
- s_Units.begin();
for (map<string, vector<int> >::iterator i = s_Races.begin(); i != s_Races.end(); i++)
{
if (m_sRace == (*i).first)
return m_sRace;
}
+//////////////////////////////////////////////////////////////////////////
+//
+/** This function iterates through m_Fleet and adds all numbers together to
+ * produce a total.
+ */
+int Fleet::NumberOfShips()
+{
+ int total = 0;
+
+ for (map<string, vector<int> >::iterator i = m_Fleet.begin(); i != m_Fleet.end(); i++)
+ {
+ total += m_Fleet[(*i).first][0];
+ }
+
+ return total;
+}