Doxygen comments added

Dependencies:   mbed Gamepad N5110

Revision:
6:bc580b480ac8
Parent:
5:3a0948f56de0
Child:
7:05f433e196d6
--- a/main.cpp	Thu May 02 18:42:43 2019 +0000
+++ b/main.cpp	Mon May 06 10:57:08 2019 +0000
@@ -12,11 +12,11 @@
 #include "N5110.h"
 #include "Gamepad.h"
 #include "Pipes.h"
-//#include "Bird.h"
+#include "Bird.h"
 
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
 Gamepad pad;
-//Bird bird;
+Bird bird;
 Pipes pipes;
 
     const int intro [40][40] =  
@@ -95,6 +95,7 @@
        int xvalue=84;
        //int height = rand() % (19 + 1 - 0) + 0;
        int height = generate_height();
+       int height2 = generate_height();
     int score = 0;
     char scoredisplay[3];
    while(1) {
@@ -118,14 +119,14 @@
           }
           
     //pipes(xvalue,height);
-    //bird.init(xaxis,yaxis);
-    //bird.draw(lcd);
-   lcd.drawSprite(xaxis,yaxis,6,6,(int*)moving);
-   yaxis=yaxis+2;
-   if (pad.check_event(Gamepad::A_PRESSED) == true) {
-       yaxis=yaxis-14;
-       }
-   
+    bird.init(xaxis,yaxis);
+    bird.draw(lcd);
+   //lcd.drawSprite(xaxis,yaxis,6,6,(int*)moving);
+   //yaxis=yaxis+2;
+   //if (pad.check_event(Gamepad::A_PRESSED) == true) {
+       //yaxis=yaxis-14;
+       //}
+   yaxis=bird.get_position(yaxis,pad);
        wait(0.075);
        xvalue=xvalue-1;
 if (check_collisions(yaxis,xvalue,height)) {
@@ -167,7 +168,7 @@
     }
     
     int generate_height() {
-    int random_height=rand() % (19 + 1 - 0) + 0;
+    int random_height=rand() % (25 + 1 - 0) + 0;
     return random_height;
     }