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.
Dependencies: mbed
Diff: Gameengine/Gameengine.cpp
- Revision:
- 57:0f3bbbac72fd
- Parent:
- 54:7fa8c07fdea4
- Child:
- 58:4a826093d9e9
--- a/Gameengine/Gameengine.cpp Wed Apr 24 20:09:22 2019 +0000
+++ b/Gameengine/Gameengine.cpp Wed Apr 24 20:56:36 2019 +0000
@@ -1,14 +1,11 @@
#include "Gameengine.h"
-
Gameengine::Gameengine()
{
}
-
Gameengine::~Gameengine()
{
}
-
//initialises default game parameters
void Gameengine::game_init()
{
@@ -126,7 +123,6 @@
char buffer[14];
sprintf(buffer,"%2d",int_score);
lcd.printString(buffer,52,2);
- printf("score = %i \n", int_score);
}
// returns true final level complete
@@ -153,6 +149,8 @@
{
if(_lives == 0 || _t.read() > _time) {
_t.stop();
+ _lives = 0; // lives reduced to zero if time runs out
+ printf("total time %f \n", _total_time);
return true;
}
return false;