SuperTuxKart
standard_race.hpp
1 // SuperTuxKart - a fun racing game with go-kart
2 // Copyright (C) 2004-2015 SuperTuxKart-Team
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 3
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
18 #ifndef _standard_race_
19 #define _standard_race_
20 
21 #include "modes/linear_world.hpp"
22 
28 class StandardRace : public LinearWorld
29 {
30 protected:
31  // clock events
32  virtual bool isRaceOver() OVERRIDE;
33 
34 public:
35  StandardRace();
36  virtual ~StandardRace() {};
37 
38  // overriding World methods
39  virtual void getDefaultCollectibles(int *collectible_type,
40  int *amount) OVERRIDE;
41  virtual bool haveBonusBoxes() OVERRIDE;
42  virtual const std::string& getIdent() const OVERRIDE;
43 
44  virtual void endRaceEarly() OVERRIDE;
45 };
46 
47 #endif
virtual void getDefaultCollectibles(int *collectible_type, int *amount) OVERRIDE
Called to determine the default collectibles to give each player at the start for this kind of race.
Definition: standard_race.cpp:49
virtual void endRaceEarly() OVERRIDE
Ends the race early and places still active player karts at the back.
Definition: standard_race.cpp:102
virtual const std::string & getIdent() const OVERRIDE
Returns an identifier for this race.
Definition: standard_race.cpp:73
virtual bool isRaceOver() OVERRIDE
Returns true if the race is finished, i.e.
Definition: standard_race.cpp:36
Represents a standard race, i.e.
Definition: standard_race.hpp:28
Definition: linear_world.hpp:35
virtual bool haveBonusBoxes() OVERRIDE
Returns if this mode supports bonus boxes or not.
Definition: standard_race.cpp:64