]> ruin.nu Git - hbs.git/blob - bs/planet.cpp
some changes
[hbs.git] / bs / planet.cpp
1 /***************************************************************************
2                           planet.cpp  -  description
3                              -------------------
4     begin                : Wed Apr 3 2002
5     copyright            : (C) 2002 by Michael Andreen
6     email                : whale@linux.nu
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
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.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #include "planet.h"
19
20 Planet::Planet()
21 {
22         m_sRace = "Planet";
23         m_iScore = 0;
24 }
25
26 Planet::~Planet(){
27 }
28
29 //////////////////////////////////////////////////////////////////////////
30 //
31 unsigned Planet::planetScore() const
32 {
33         return m_iScore;
34 }
35
36 //////////////////////////////////////////////////////////////////////////
37 //
38 void Planet::setPlanetScore(unsigned i)
39 {
40         m_iScore = i;
41 }
42
43 //////////////////////////////////////////////////////////////////////////
44 //
45 int roids(std::string type, int tick = 0) const
46 {
47         ticks = m_Roids[type].size();
48         if( ticks == 0)
49                 return 0;
50         if (ticks < tick)
51                 return m_Roids[type][ticks];
52         return m_Roids[type][tick];
53 }
54
55 //////////////////////////////////////////////////////////////////////////
56 //
57 void setRoids(std::string type, int number)
58 {
59         if (m_Roids[type].size() == 0)
60                 m_Roids.push_back(number);
61         m_Roids[type][0] = number;
62 }
63
64