ELEC2645 (2016/17) / Mbed 2 deprecated 2645_project_final

Dependencies:   Finalproject N5110 mbed

Fork of 2645_project_final by Levs Dumans

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