geekbrains_gof/SBomber/include/House.h

35 lines
558 B
C
Raw Permalink Normal View History

2021-12-20 22:22:05 +00:00
#pragma once
#include "DestroyableGroundObject.h"
#include <cstdint>
2022-02-05 09:05:21 +00:00
class House: public DestroyableGroundObject
{
2021-12-20 22:22:05 +00:00
public:
2022-02-05 09:05:21 +00:00
House() {}
2021-12-20 22:22:05 +00:00
2022-02-05 09:05:21 +00:00
House(const House &h)
{
x = h.x;
y = h.y;
width = h.width;
}
2021-12-20 22:22:05 +00:00
2022-02-05 09:05:21 +00:00
bool isInside(double x1, double x2) const override;
inline uint16_t GetScore() const override
{
return score;
}
void Draw() const override;
House* clone() const
{
return new House(*this);
}
2021-12-20 22:22:05 +00:00
private:
2022-02-05 09:05:21 +00:00
const uint16_t score = 40;
2021-12-20 22:22:05 +00:00
};