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
519 B
C++
23 lines
519 B
C++
#ifndef SHAPE_H
|
|
#define SHAPE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
class Shape {
|
|
protected: /* Shape's attributes... */
|
|
int16_t x; /* x-coordinate of Shape's position */
|
|
int16_t y; /* y-coordinate of Shape's position */
|
|
|
|
public: /* Shape's operations... */
|
|
Shape(int16_t x0, int16_t y0);
|
|
void moveBy(int16_t dx, 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_H */
|