X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fplanet.cpp;h=4fa69786a009e426ae8dd666724965d3aa89465c;hp=e8954e16e32700fcff56cdcd50c6c168c21bfeb0;hb=595e711e719a6e6b675b1f40e3e141cd9b770fd9;hpb=b6d8203669c6a6016458e72fd240527845449475 diff --git a/bs/planet.cpp b/bs/planet.cpp index e8954e1..4fa6978 100644 --- a/bs/planet.cpp +++ b/bs/planet.cpp @@ -26,12 +26,39 @@ Planet::Planet() Planet::~Planet(){ } -unsigned Planet::score(int tick = 0) +////////////////////////////////////////////////////////////////////////// +// +unsigned Planet::planetScore() const { return m_iScore; } -void Planet::setScore(unsigned i) +////////////////////////////////////////////////////////////////////////// +// +void Planet::setPlanetScore(unsigned i) { m_iScore = i; } + +////////////////////////////////////////////////////////////////////////// +// +int roids(std::string type, int tick = 0) const +{ + ticks = m_Roids[type].size(); + if( ticks == 0) + return 0; + if (ticks < tick) + return m_Roids[type][ticks]; + return m_Roids[type][tick]; +} + +////////////////////////////////////////////////////////////////////////// +// +void setRoids(std::string type, int number) +{ + if (m_Roids[type].size() == 0) + m_Roids.push_back(number); + m_Roids[type][0] = number; +} + +