Ahmed Hedait / Mbed 2 deprecated el16ah

Dependencies:   mbed

Revision:
25:28c57be06933
Parent:
23:6733f8b9c321
--- a/MazeEngine/MazeEngine.cpp	Tue May 08 13:39:31 2018 +0000
+++ b/MazeEngine/MazeEngine.cpp	Tue May 08 14:20:24 2018 +0000
@@ -30,20 +30,20 @@
 
 void MazeEngine::draw(N5110 &lcd)
 {
-    // draw the elements in the LCD buffer
-    // maze
+    // DRAW THE ELEMENTS OF MAZE.
     _maze.draw(lcd);
 
-    // ball
+    // BALL DRAWING
     _ball.draw(lcd);
 
-    // HERE IS A SIMPLE CODE THAT WHEN THE BALL PASS THROUGH THE OPENING THEN THE SCREEN SHOULD BE CLEARED IN WHICH BRAVO IS PRINTED TO
-    //    TELL THE USER THE GAME IS FINISHED.
+    /* HERE IS A SIMPLE CODE THAT WHEN THE BALL PASS THROUGH THE OPENING THEN THE SCREEN SHOULD BE CLEARED IN WHICH BRAVO IS PRINTED TO
+    TELL THE USER THE GAME IS FINISHED. */
     if (ball_pos.x > 83 & ball_pos.y == 27) {
         print_win(lcd);
     }
 }
 
+// CHECK IF THE GOAL IS MET, AND GIVE THE USER ABILITY TO RESTART THE GAME AGAIN.
 void MazeEngine::check_goal(Gamepad &pad)
 {
     ball_pos = _ball.get_pos();
@@ -54,9 +54,10 @@
     }
 }
 
+// CHECK IF THE GOAL IS MET, AND PRINT OUT TO THE LCD SCREEN. 
 void MazeEngine::print_win(N5110 &lcd)
 {
     lcd.clear();
-    lcd.printString("  Bravo!  ",12,2);
+    lcd.printString("  WELL DONE!  ",3,2);
     lcd.printString("  Press Start ",0,4);
 }
\ No newline at end of file