You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
567 B
C++

#ifndef SHAPE_HPP_
#define SHAPE_HPP_
#include <cstdint> // standard integer types
class Shape {
private: // Shape's attributes...
std::int16_t x; // x-coordinate of Shape's position
std::int16_t y; // y-coordinate of Shape's position
public: // Shape's operations...
Shape(std::int16_t x0, std::int16_t y0);
void moveBy(std::int16_t dx, std::int16_t dy);
uint16_t distanceFrom(Shape const * other) const;
virtual void draw() const;
virtual uint32_t area() const;
};
void drawGraph(Shape const *graph[]);
#endif // SHAPE_HPP_