SVN_SILENT made messages (.desktop file)
[kdegames.git] / kapman / energizer.cpp
blob29f7d464b222f47e5e46b11ceaf289ec45457665
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.
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/>.
20 #include "energizer.h"
21 #include "kapman.h"
23 const int Energizer::POINTS = 50;
25 Energizer::Energizer(qreal p_x, qreal p_y, Maze* p_maze, const QString& p_imageId) : Element(p_x, p_y, p_maze) {
26 Element::setImageId(p_imageId);
27 m_points = 50;
28 m_type = Element::ENERGYZER;
31 Energizer::~Energizer() {
34 void Energizer::doActionOnCollision(Kapman* p_kapman) {
35 p_kapman->winPoints(this);
36 // Tell to the maze that an element was eaten
37 m_maze->decrementNbElem();