wall.hpp 653 B

12345678910111213141516171819202122232425262728
  1. /* This file is part of Invaders.
  2. *
  3. * Copyright (C) 2020 LCM.
  4. * You may use, distribute and modify Invaders under the terms of the
  5. * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
  6. */
  7. #ifndef _wall_
  8. #define _wall_
  9. #include "game_object.hpp"
  10. #include "body.hpp"
  11. #include <iostream>
  12. class wall:public game_object, public body{
  13. public:
  14. wall();
  15. wall(int x,int y,int w,int h,int life);
  16. ~ wall();
  17. //int** health;
  18. int health[MAX_WIDTH][MAX_HEIGHT];
  19. void set_life(int life);
  20. void create(int x,int y,int w,int h,int life); //re-initializes parameters of a pre-existent wall
  21. void printlife(); //prints health matrix
  22. };
  23. #endif