12345678910111213141516171819202122232425262728 |
- /* This file is part of Invaders.
- *
- * Copyright (C) 2020 LCM.
- * You may use, distribute and modify Invaders under the terms of the
- * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
- */
- #ifndef _wall_
- #define _wall_
- #include "game_object.hpp"
- #include "body.hpp"
- #include <iostream>
- class wall:public game_object, public body{
- public:
- wall();
- wall(int x,int y,int w,int h,int life);
- ~ wall();
- //int** health;
- int health[MAX_WIDTH][MAX_HEIGHT];
- void set_life(int life);
- void create(int x,int y,int w,int h,int life); //re-initializes parameters of a pre-existent wall
- void printlife(); //prints health matrix
- };
- #endif
|