#include "Shape.h" #include /*Default constructor*/ Shape::Shape(void) { position.shapeTop = 0; position.shapeBottom = 0; position.shapeLeft = 0; position.shapeRight = 0; xBounds = true; yBounds = true; } /*Set constructor with values*/ Shape::Shape(const float x, const float y, const float width, const float height) { position.shapeTop = y + height; position.shapeBottom = y; position.shapeLeft = x; position.shapeRight = x + width; xBounds = true; yBounds = true; } /*Destructor*/ Shape::~Shape(void) { } /*Update the x and y values*/ void Shape::moveShape(const float x, const float y) { position.shapeTop += y; position.shapeBottom += y; position.shapeLeft += x; position.shapeRight += x; } /*equal (==) operator*/ bool Shape::operator==(const Shape &square) const { return (this == &square) ? true : false; } /*not equal (!=) operator*/ bool Shape::operator!=(const Shape &square) const { return (this == &square) ? false : true; }