]> ruin.nu Git - hbs.git/blobdiff - bs/fleet.cpp
added comboboxes for the battle and group in the info view
[hbs.git] / bs / fleet.cpp
index cb15df528c6bce726a0f7dd52db026f7d57f5a31..7361fe2122b486a4b32b11f7d69e44a3d27a857e 100644 (file)
@@ -29,6 +29,7 @@ Fleet::Fleet()
        m_iETA = 0;
        m_sRace = "Cathaar";
 }
+
 Fleet::~Fleet(){
 }
 
@@ -174,3 +175,26 @@ unsigned Fleet::score(int tick = 0) const
        return tot_score;
 }
 
+//////////////////////////////////////////////////////////////////////////
+//
+void Fleet::setFleet(string unittype, int number)
+{
+       if (m_Fleet[unittype].size() == 0)
+       {
+               m_Fleet[unittype].push_back(number);
+               return;
+       }
+       m_Fleet[unittype][0] = number;
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
+int     Fleet::fleet(string unittype, int tick = 0)
+{
+       if (m_Fleet[unittype].size() == 0)
+               return 0;
+
+       return m_Fleet[unittype][tick];
+}
+
+