Version of Robotron arcade game using LPC1768, a Gameduino shield, a serial EEPROM (for high scores), two microswitch joysticks and two buttons plus a box to put it in. 20 levels of mayhem.

Dependencies:   25LCxxx_SPI CommonTypes Gameduino mbed

Revision:
10:bfa1c307c99d
Parent:
9:fa7e7b37b632
Child:
14:46a353b2a8e8
--- a/GameRobotRic.cpp	Sun Jun 09 14:28:53 2013 +0000
+++ b/GameRobotRic.cpp	Sun Jun 09 19:34:56 2013 +0000
@@ -127,20 +127,22 @@
         level->SetGameduino( &gd );
         // Play the level.
         exitCode = level->Play();
+        // Free memory used by level.
+        levels.FreeLevel( level );
         // If player was killed then decrement lives otherwise
         // advance to next level.
         switch( exitCode ) {
-            case Level::GameOver :
-                // TODO : Do some sort of game over fuss.
-                CheckForHighScore( &gd, &highScores, player.Score );
-                // Go back to attract level and reset player lives and score.
-                levelNumber = LevelCollection::AttractLevel;
-                player.Lives = START_LIVES;
-                player.Score = 0;
-                break;
-            case Level::Completed :
-                levelNumber++;
-                break;
+        case Level::GameOver :
+            // TODO : Do some sort of game over fuss.
+            CheckForHighScore( &gd, &highScores, player.Score );
+            // Go back to attract level and reset player lives and score.
+            levelNumber = LevelCollection::AttractLevel;
+            player.Lives = START_LIVES;
+            player.Score = 0;
+            break;
+        case Level::Completed :
+            levelNumber++;
+            break;
         }
     }
 }