ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
12:954da4f4e565
Parent:
11:f481ec642cc5
Child:
13:924891519a95
--- a/main.cpp	Mon Apr 22 19:57:01 2019 +0000
+++ b/main.cpp	Tue Apr 23 12:46:34 2019 +0000
@@ -20,6 +20,7 @@
 Gamepad pad;
 Cricket cricket;
 
+
 void init();
 
 //void welcome();
@@ -27,13 +28,14 @@
 void ball_test();
 
 int main(){
-    int fps=8;
+    int fps=11;
     init();
    // welcome();
     draw();
-    float f; 
-    int status=0;
+    //float f; 
+    //int status=0;
     while(1){
+        //Direction dir=pad.get_direction();
         cricket.game(lcd,pad);
         draw();
         wait(1.0f/fps);                
@@ -56,7 +58,9 @@
 void init(){
     lcd.init();
     pad.init();
+    //ball1.init(2,4);
     cricket.init();
+    //bat1.init();
     lcd.setContrast(0.4);
     lcd.normalMode();      // normal colour mode
     lcd.setBrightness(0.5);
@@ -81,13 +85,14 @@
 void draw(){
     lcd.clear();
     cricket.draw(lcd);
+    //ball1.draw(lcd);
+    //bat1.draw(lcd);
     lcd.refresh();
 }
 /*void ball_test(){
     Vector2D ball_pos = ball.get_pos();
     Vector2D ball_velocity = ball.get_velocity();
     ball.update();  
-    
     ball.set_velocity(ball_velocity);
     ball.set_pos(ball_pos);
     ball.update();