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:
- 61:0a8b3ffedc40
- Parent:
- 60:63d69184ec0a
- Child:
- 62:64559062e0ec
--- a/BreakoutEngine/BreakoutEngine.cpp Sat May 04 19:57:31 2019 +0000
+++ b/BreakoutEngine/BreakoutEngine.cpp Sat May 04 20:01:54 2019 +0000
@@ -90,7 +90,7 @@
void BreakoutEngine::moveback_bricks() // rename to reset add in ball reset and use to increase the number of balls each time
{
reset_num_left();
-
+ _ball.init(_ball_size,_speed + 1); // replace the 1 with a multiplier private variable that tracks the number of times continued from victory
int pointer = 0;
for (it_R = listofBricks.begin(); it_R != listofBricks.end(); ++it_R){
if (pointer <= 5) {
@@ -432,7 +432,7 @@
void BreakoutEngine::print_scores(N5110 &lcd) //maybe add to oneless
{
// get scores from paddles
- int multiplier = get_prev_score()/1800 + 1;
+ int multiplier = get_prev_score()/1800 + 1; // add in a multiplier private variable so that it can increment
int p1_score = get_prev_score() + (18 - get_num_left())*100 * multiplier; //maybe add a previous score so the score carries over through victory screens. add hi score fix so restart restarts from 321
// also, add a multiplier of 2 for every contiue on victory
// print to LCD i