Rally X
ELEN3009 Project by Justin Wernick and David Schneider
source/logic/PlayerCar.h
Go to the documentation of this file.
00001 #ifndef PLAYERCAR_H
00002 #define PLAYERCAR_H
00003 
00004 #include <cmath>
00005 #include <list>
00006 using namespace std;
00007 
00008 #include "../presentation/KeyboardHandler.h"
00009 #include "../presentation/BitmapStore.h"
00010 
00011 #include "../logic/Car.h"
00012 #include "../logic/Maze.h"
00013 #include "../logic/Smokescreen.h"
00014 
00023 class PlayerCar: public Car
00024 {
00025     public:
00037         PlayerCar(double x, double y, Maze::Direction facing=Maze::UP);
00038 
00039         //assignment and copy constructors have been left with the compiler generated versions
00040 
00052         void update(const Maze& maze, list<Smokescreen>& currentSmoke);
00053 
00064         void makeSmoke(list<Smokescreen>& currentSmoke);
00065 
00071         void gotCheckpoint();
00072 
00076         void crash();
00077 
00081         double petrol() const;
00082 
00083     private:
00084         KeyboardHandler _input; 
00085 
00092         double _petrol;
00093 
00094         static const double PETROL_USE_RATE = 0.0007; 
00095         static const double PETROL_USE_SMOKESCREEN = 0.05; 
00096         static const double PETROL_FROM_CHECKPOINT = 0.2; 
00097 };
00098 
00099 #endif // PLAYERCAR_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator