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: BreakoutEngine/BreakoutEngine.cpp
- Revision:
- 57:d498dd835cfc
- Parent:
- 48:966f2cf803ec
- Child:
- 60:63d69184ec0a
--- a/BreakoutEngine/BreakoutEngine.cpp Sun Apr 28 16:46:19 2019 +0000
+++ b/BreakoutEngine/BreakoutEngine.cpp Tue Apr 30 10:06:46 2019 +0000
@@ -1,6 +1,6 @@
#include "BreakoutEngine.h"
-
+#include <iostream>
BreakoutEngine::BreakoutEngine()
{
@@ -14,6 +14,10 @@
void BreakoutEngine::init(int paddle_width,int paddle_height,int ball_size,int speed, int prev_score)
{
+ printf("init started /n");
+ listofBricks.clear();
+ listofLasers.clear();
+
// initialise the game parameters
_paddle_width = paddle_width;
_paddle_height = paddle_height;
@@ -78,6 +82,7 @@
listofLasers.push_back(_laser1);
listofLasers.push_back(_laser2);
listofLasers.push_back(_laser3);
+ printf("init ended /n");
}
void BreakoutEngine::read_input(Gamepad &pad, bool x)