Doxygen comments added

Dependencies:   mbed Gamepad N5110

Revision:
8:d91564c0f337
Parent:
7:05f433e196d6
Child:
9:b7a3ec1c7217
--- a/main.cpp	Mon May 06 22:55:38 2019 +0000
+++ b/main.cpp	Tue May 07 11:44:52 2019 +0000
@@ -15,6 +15,8 @@
 #include "Bird.h"
 #include "Entrance.h"
 #include "FlappyBirdEngine.h"
+#define PIPE_WIDTH 8
+#define BIRD_X 25
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
 Gamepad pad;
 Bird bird;
@@ -52,12 +54,10 @@
       //xvalue=xvalue-1;
       sprintf(scoredisplay,"%d",score); 
       lcd.printString(scoredisplay,60,0); //display the score on the up right
-    
-      if(xvalue<20 && xvalue>17) {       
-          score=score+1;
-          }
+        
+        flappy.get_score(score);
+         score=flappy.add_score(score,xvalue,BIRD_X,PIPE_WIDTH);
          
-          
       if(xvalue<1) {
           height=pipes.generate_height();
           xvalue=84;
@@ -71,7 +71,6 @@
        xvalue=xvalue-2;
 if (check_collisions(yaxis,xvalue,height)) {
        wait(1);
-       flappy.get_score(score);
        if (flappy.check_for_highscore(highscore)) {
            highscore=score;}
         flappy.update_highscore(highscore);