Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Finalproject N5110 mbed
Fork of 2645_project_final by
Diff: Rectangle/Rectangle.h
- Revision:
- 0:5dd225e2621d
diff -r 000000000000 -r 5dd225e2621d Rectangle/Rectangle.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Rectangle/Rectangle.h Fri May 05 15:00:33 2017 +0000
@@ -0,0 +1,40 @@
+#ifndef RECTANGLE_H
+#define RECTANGLE_H
+
+#include "mbed.h"
+
+/**Rectangle class
+@brief Abstract class that defines collision between rectangles
+@author Lev Duman
+@date May 4 2017
+*/
+class Rectangle
+{
+ public:
+ /**Coollion to the north*/
+ bool collisionLeftUpN(Rectangle a);
+ /**Coollion to the south*/
+ bool collisionLeftUpS(Rectangle a);
+ /**Coollion to the west*/
+ bool collisionLeftUpW(Rectangle a);
+ /**Coollion to the east*/
+ bool collisionLeftUpE(Rectangle a);
+ /**Coollion to the north*/
+ bool touchLeftDownN(Rectangle a);
+ /**Coollion to the south*/
+ bool touchLeftDownS(Rectangle a);
+ /**Coollion to the west*/
+ bool touchLeftDownW(Rectangle a);
+ /**Coollion to the east*/
+ bool touchLeftDownE(Rectangle a);
+ int getX();
+ int getY();
+ int getWidth();
+ int getHeight();
+ protected:
+ int x;
+ int y;
+ int height;
+ int width;
+};
+#endif
\ No newline at end of file
