X-Git-Url: https://ruin.nu/git/index.pl?a=blobdiff_plain;f=bs%2Fplanet.cpp;h=4fa69786a009e426ae8dd666724965d3aa89465c;hb=595e711e719a6e6b675b1f40e3e141cd9b770fd9;hp=03c45370700acb53018ce2c342cebaa477cc0992;hpb=0fcfaff680c6974a9b3f2a63704a8eb788d3fe94;p=hbs.git diff --git a/bs/planet.cpp b/bs/planet.cpp index 03c4537..4fa6978 100644 --- a/bs/planet.cpp +++ b/bs/planet.cpp @@ -17,7 +17,48 @@ #include "planet.h" -Planet::Planet(){ +Planet::Planet() +{ + m_sRace = "Planet"; + m_iScore = 0; } + Planet::~Planet(){ } + +////////////////////////////////////////////////////////////////////////// +// +unsigned Planet::planetScore() const +{ + return m_iScore; +} + +////////////////////////////////////////////////////////////////////////// +// +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; +} + +