1 | /* |
2 | * Copyright 2007-2008 Thomas Gallinari <tg8187@yahoo.fr> |
3 | * Copyright 2007-2008 Gaƫl Courcelle <gael.courcelle@gmail.com> |
4 | * Copyright 2007-2008 Alexia Allanic <alexia_allanic@yahoo.fr> |
5 | * |
6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License as |
8 | * published by the Free Software Foundation; either version 2 of |
9 | * the License, or (at your option) any later version. |
10 | * |
11 | * This program is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. |
15 | * |
16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | */ |
19 | |
20 | #ifndef ENERGIZER_H |
21 | #define ENERGIZER_H |
22 | |
23 | |
24 | #include "element.h" |
25 | |
26 | /** |
27 | * @brief This class represents an energizer enabling to eat Ghosts. |
28 | */ |
29 | class Energizer : public Element { |
30 | |
31 | Q_OBJECT |
32 | |
33 | public: |
34 | |
35 | /** The value of an Energyzer */ |
36 | static const int POINTS; |
37 | |
38 | public: |
39 | |
40 | /** |
41 | * Creates a new Energizer instance. |
42 | * @param p_x the x-coordinate |
43 | * @param p_y the y-coordinate |
44 | * @param p_maze the Maze the Energyzer is on |
45 | * @param p_imageId the path to the Energyzer image |
46 | */ |
47 | Energizer(qreal p_x, qreal p_y, Maze* p_maze, const QString& p_imageId); |
48 | |
49 | /** |
50 | * Deletes the Energizer instance. |
51 | */ |
52 | ~Energizer(); |
53 | |
54 | /** |
55 | * Gets the type of the Energyzer. |
56 | * @return the type of the Energyzer |
57 | */ |
58 | QString getType(); |
59 | |
60 | /** |
61 | * Computes an action on a collision with the Kapman. |
62 | * @param p_kapman the instance of Kapman which collides with the Energyzer |
63 | */ |
64 | void doActionOnCollision(Kapman* p_kapman); |
65 | }; |
66 | |
67 | #endif |
68 | |
69 | |