#include "Expansion.h" Expansion::Expansion(SDL_Surface *screen, Collisions *gestionnaireCollisons, Sounderer *mediaPlayer, SDL_Surface* apparence) : Power(screen, gestionnaireCollisons, mediaPlayer, apparence) { }///Constructeur Expansion::~Expansion() { }///Destructeur void Expansion::usePower(int orientation, int &x, int &y, int const &ID) { //[0] Bruitage m_mediaPlayer->play("Expansion"); //[1] Paramètres int portee(5); int const posX(x); int const posY(y); //[2] Epandage if (orientation==HAUT || orientation==BAS) {//Epandage horizontal for (int i(-portee); i <= portee; i++) m_gestionnaireCollisions->ajouter(posX+i, posY, ID); } else {//Epandage vertical for (int i(-portee); i <= portee; i++) m_gestionnaireCollisions->ajouter(posX, posY+i, ID); } //[END] m_used = true; }///usePower void Expansion::postMortemPower(int const &x, int const &y, int const &ID) { //[0] Bruitage m_mediaPlayer->play("Expansion"); //[1] Etalage for (int i(0); i<3; i++) for (int j(0); j<3;j++) m_gestionnaireCollisions->ajouter(x-1+i, y-1+j, ID); //[END] m_used = true; }///postMortemPower