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:
- 10:f5b920a6a71a
- Parent:
- 9:4b11ee1155ad
- Child:
- 11:4722bf70b2be
diff -r 4b11ee1155ad -r f5b920a6a71a main.cpp
--- a/main.cpp Fri Apr 10 08:24:48 2020 +0000
+++ b/main.cpp Sat Apr 18 11:50:00 2020 +0000
@@ -27,22 +27,27 @@
//functions
void initialise();
+//variables
+bool game_check = false;
+
int main()
{
initialise();
- while(1) {
+ while(game_check == false) {
lcd.clear();
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);
lcd.refresh();
- wait(0.135);
+ wait(0.075);
//functions.ball_position_parabolic(lcd, objects,5);