File indexing completed on 2023-10-01 08:02:06
0001 /* 0002 SPDX-FileCopyrightText: 2007-2008 Thomas Gallinari <tg8187@yahoo.fr> 0003 SPDX-FileCopyrightText: 2007-2008 Gaƫl Courcelle <gael.courcelle@gmail.com> 0004 SPDX-FileCopyrightText: 2007-2008 Alexia Allanic <alexia_allanic@yahoo.fr> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #include "pill.h" 0010 #include "kapman.h" 0011 0012 const int Pill::POINTS = 10; 0013 0014 Pill::Pill(qreal p_x, qreal p_y, Maze *p_maze, const QString &p_imageId) 0015 : Element(p_x, p_y, p_maze) 0016 { 0017 Element::setImageId(p_imageId); 0018 m_points = Pill::POINTS; 0019 m_type = Element::PILL; 0020 } 0021 0022 Pill::~Pill() = default; 0023 0024 void Pill::doActionOnCollision(Kapman *p_kapman) 0025 { 0026 p_kapman->winPoints(this); 0027 // Tell to the maze that an element was eaten 0028 m_maze->decrementNbElem(); 0029 } 0030 0031 #include "moc_pill.cpp"