File indexing completed on 2024-04-21 04:01:58

0001 /*
0002     SPDX-FileCopyrightText: 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
0003     SPDX-FileCopyrightText: 2007-2008 Gaƫl Courcelle <gael.courcelle@gmail.com>
0004     SPDX-FileCopyrightText: 2007-2008 Alexia Allanic <alexia_allanic@yahoo.fr>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef PILL_H
0010 #define PILL_H
0011 
0012 #include "element.h"
0013 
0014 /**
0015  * @brief This class represents a Pill enabling to earn points.
0016  */
0017 class Pill : public Element
0018 {
0019     Q_OBJECT
0020 public:
0021     /** The Pill value */
0022     static const int POINTS;
0023 
0024 public:
0025     /**
0026      * Creates a new Pill instance.
0027      */
0028     Pill(qreal p_x, qreal p_y, Maze *p_maze, const QString &p_imageId);
0029 
0030     /**
0031      * Deletes the Pill instance.
0032      */
0033     ~Pill() override;
0034 
0035     /**
0036      * Computes an action on a collision with the Kapman.
0037      * @param p_kapman the instance of Kapman which collides with the Pill
0038      */
0039     void doActionOnCollision(Kapman *p_kapman) override;
0040 };
0041 
0042 #endif