Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 11:4722bf70b2be
- Parent:
- 10:f5b920a6a71a
- Child:
- 12:f7dfd44569b6
--- a/main.cpp Sat Apr 18 11:50:00 2020 +0000 +++ b/main.cpp Mon Apr 20 07:57:09 2020 +0000 @@ -30,6 +30,7 @@ //variables bool game_check = false; + int main() { initialise(); @@ -39,26 +40,20 @@ objects.draw_base(lcd); objects.cannon_position(pad); objects.draw_cannon(lcd); - //functions.ball_position_linear(lcd, objects,1); - functions.ball_position_parabolic(lcd, objects,5); - functions.ball_position_parabolic(lcd, objects,2); - functions.ball_position_linear(lcd, objects,8); + game_check = functions.cannon_smash(lcd, objects); objects.draw_shots(lcd); functions.collision_checker(lcd,objects); + functions.ball_position_parabolic(lcd,objects,3); lcd.refresh(); - wait(0.075); + wait(0.25); - //functions.ball_position_parabolic(lcd, objects,5); - + lcd.clear(); objects.cannon_position(pad); objects.draw_cannon(lcd); - //objects.draw_shots(lcd); - //functions.collision_checker(lcd,objects); - lcd.refresh(); wait(0.005); - //printf("|%f\n|",pad.read_pot1()); + } } @@ -67,6 +62,7 @@ { pad.init();//initialises the gamepad lcd.init();//initialises the N5100 screen + lcd.clear(); }