File indexing completed on 2023-10-01 08:02:04
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 ENERGIZER_H 0010 #define ENERGIZER_H 0011 0012 #include "element.h" 0013 0014 /** 0015 * @brief This class represents an energizer enabling to eat Ghosts. 0016 */ 0017 class Energizer : public Element 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 /** The value of an Energyzer */ 0023 static const int POINTS; 0024 0025 public: 0026 /** 0027 * Creates a new Energizer instance. 0028 * @param p_x the x-coordinate 0029 * @param p_y the y-coordinate 0030 * @param p_maze the Maze the Energyzer is on 0031 * @param p_imageId the path to the Energyzer image 0032 */ 0033 Energizer(qreal p_x, qreal p_y, Maze *p_maze, const QString &p_imageId); 0034 0035 /** 0036 * Deletes the Energizer instance. 0037 */ 0038 ~Energizer() override; 0039 0040 /** 0041 * Gets the type of the Energyzer. 0042 * @return the type of the Energyzer 0043 */ 0044 QString getType(); 0045 0046 /** 0047 * Computes an action on a collision with the Kapman. 0048 * @param p_kapman the instance of Kapman which collides with the Energyzer 0049 */ 0050 void doActionOnCollision(Kapman *p_kapman) override; 0051 }; 0052 0053 #endif