]> rtime.felk.cvut.cz Git - hubacji1/psp.git/blobdiff - api/psp.h
Add parked skeleton, ut
[hubacji1/psp.git] / api / psp.h
index 529c04d7ecbe6ce0ec1f97ee0596cf556dbbc8ce..c79cfbadfe4f131322ece8fdcab7298a5773b865 100644 (file)
--- a/api/psp.h
+++ b/api/psp.h
@@ -17,6 +17,12 @@ class PSPlanner {
                 BicycleCar cc_;
                 BicycleCar gc_;
                 ParkingSlot ps_;
+
+                // find entry to slot by reverse approach
+                void fe_parallel();
+                void fe_perpendicular();
+                void fer_parallel();
+                void fer_perpendicular();
         public:
                 /*! \brief Return `true` if there is collision.
 
@@ -30,12 +36,24 @@ class PSPlanner {
                 (parking slot lines).
                 */
                 bool collide();
+                /*! \brief Return parking direction
+
+                Return `true` if the direction of the parking in the
+                slot is forward.
+                */
+                bool forward();
                 /*! \brief Has current car `cc` left?
 
                 Return `true` if the current car `cc` left the parking
                 slot `ps`;
                 */
                 bool left();
+                /*! \brief Is the goal car `gc` parked?
+
+                Return `true` if the goal car `gc` is inside the
+                parking slot `ps`.
+                */
+                bool parked();
 
                 // find entry
                 /*! \brief Find entry to the parking slot.