geekbrains_gof/SBomber/include/Tank.h

35 lines
518 B
C++

#pragma once
#include <stdint.h>
#include "DestroyableGroundObject.h"
class Tank : public DestroyableGroundObject
{
public:
Tank() {}
Tank(const Tank &t)
{
x = t.x;
y = t.y;
width = t.width;
}
bool isInside(double x1, double x2) const override;
inline uint16_t GetScore() const override { return score; }
void Draw() const override;
Tank* clone() const
{
return new Tank(*this);
}
private:
const uint16_t score = 30;
};