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>
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.
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.
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/>.
27 * @brief This class represents an energizer enabling to eat Ghosts.
29 class Energizer
: public Element
{
35 /** The value of an Energyzer */
36 static const int POINTS
;
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
47 Energizer(qreal p_x
, qreal p_y
, Maze
* p_maze
, const QString
& p_imageId
);
50 * Deletes the Energizer instance.
55 * Gets the type of the Energyzer.
56 * @return the type of the Energyzer
61 * Computes an action on a collision with the Kapman.
62 * @param p_kapman the instance of Kapman which collides with the Energyzer
64 void doActionOnCollision(Kapman
* p_kapman
);