wall.hpp 448 B

1234567891011121314151617181920
  1. #ifndef _wall_
  2. #define _wall_
  3. #include "game_object.hpp"
  4. #include "body.hpp"
  5. #include <iostream>
  6. class wall:public game_object, public body{
  7. public:
  8. wall();
  9. wall(int x,int y,int w,int h,int life);
  10. ~ wall();
  11. //int** health;
  12. int health[MAX_WIDTH][MAX_HEIGHT];
  13. void set_life(int life);
  14. void create(int x,int y,int w,int h,int life); //re-initializes parameters of a pre-existent wall
  15. void printlife(); //prints health matrix
  16. };
  17. #endif