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/>.
20
#include "energizer.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 = Energizer::POINTS;
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();