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 * Copyright 2007-2008 Johann Hingue <yoan1703@hotmail.fr>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef BONUS_H
22#define BONUS_H
23
24#include "element.h"
25
26/**
27 * @brief This class represents a Bonus for Kapman.
28 */
29class Bonus : public Element {
30
31 public:
32
33 /**
34 * Creates a new Bonus instance.
35 * @param p_x the initial x-coordinate
36 * @param p_y the initial y-coordinate
37 * @param p_maze a reference to the Maze the Bonus will be on
38 * @param p_points the value of the Bonus
39 */
40 Bonus(qreal p_x, qreal p_y, Maze* p_maze, int p_points);
41
42 /**
43 * Deletes the Bonus instance.
44 */
45 ~Bonus();
46
47 /**
48 * Computes an action on a collision with the Kapman.
49 * @param p_kapman the Kapman instance that collides with the Bonus
50 */
51 void doActionOnCollision(Kapman* p_kapman);
52
53 /**
54 * Sets the given value to the Bonus.
55 * @param p_points the value of the Bonus
56 */
57 void setPoints(const int p_points);
58};
59
60#endif
61
62