#ifndef CHECKPOINT_H #define CHECKPOINT_H #include "../logic/GameObject.h" #include "../presentation/BitmapStore.h" /** * @brief GameObject that the player needs to pick up by driving over. * * The level is complete when all checkpoints have been collected. * * @author Justin Wernick * @author David Schneider */ class Checkpoint: public GameObject { public: /** * @brief Function for accessing the number of checkpoints that currently exist. * * @return The number of checkpoints that currently exist. */ static int checkpointCount(); /** * @brief Creates a checkpoint at the given coordinates. * * @param [in] x x coordinate of Checkpoint's position. * @param [in] y y coordinate of Checkpoint's position. */ Checkpoint(double x, double y); /** * @brief Copy constuctor, overwritten to include in the counting of Checkpoints. */ Checkpoint(const Checkpoint& ref); //assignment operator has been left with the compiler generated version. /** * @brief Destructor, decreases the number of Checkpoints in existence. */ ~Checkpoint(); /** * @brief Function to be called when a PlayerCar collects the Checkpoint. */ void collect(); private: static int _checkpointCount; ///< Count of the number of Checkpoints currently in existence. }; #endif // CHECKPOINT_H