#include "objSpot.h" spot::spot () { x = 20; y = 20; } spot::spot (int x, int y) { this->x = x; this->y = y; } spot::~spot () { } void spot::plot (HDC hdc) { for (int i = (x - 5); i < (x + 2); i++) { for (int k = (y - 5); k < (y + 2); k++) { SetPixel(hdc, i, k, RGB(0, 0, 255)); } } } void spot::erase (HDC hdc) { for (int i = (x - 5); i < (x + 2); i++) { for (int k = (y - 5); k < (y + 2); k++) { SetPixel(hdc, i, k, RGB(255, 255, 255)); } } } void spot::move (HDC hdc, int toX, int toY) { erase(hdc); x = toX; y = toY; plot(hdc); } int spot::getX () { return x; } int spot::getY () { return y; }