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.
Revision 12:d68c757d829a, committed 2017-05-02
- Comitter:
- musallambseiso
- Date:
- Tue May 02 22:13:10 2017 +0000
- Parent:
- 11:10c01766f774
- Child:
- 13:f3560c403397
- Commit message:
- Added Doxygen, tidied code, added second weapon type (star)
Changed in this revision
Engine.cpp | Show annotated file Show diff for this revision Revisions of this file |
Engine.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Engine.cpp Mon May 01 13:01:57 2017 +0000 +++ b/Engine.cpp Tue May 02 22:13:10 2017 +0000 @@ -10,7 +10,9 @@ { collisions = 0; wave_counter = 0; + star = true; ammo = 3; + pauses = 3; } Engine::~Engine() @@ -25,12 +27,12 @@ _speed = speed; _friendly.init(); // friendly ship initialization - _ship1.init(_speed); // enemy ships initialization - _ship2.init(_speed); - _ship3.init(_speed); - _ship4.init(_speed); - _ship5.init(_speed); - _ship6.init(_speed); + _enemy1.init(_speed); // enemy ships initialization + _enemy2.init(_speed); + _enemy3.init(_speed); + _enemy4.init(_speed); + _enemy5.init(_speed); + _enemy6.init(_speed); } void Engine::read_input(Gamepad &pad) @@ -42,129 +44,146 @@ // ::: DRAWING FUNCTIONS ::: -void Engine::draw(N5110 &lcd) +void Engine::draw_all(N5110 &lcd) { - _stats.grid_draw(lcd); // initial grid and border generation + _stats.draw_grid(lcd); // initial grid and border generation _stats.draw_health(lcd); // health counter generation (initial state) _stats.check_health(lcd, collisions); // health counter generation (later states) - _stats.check_rocket(lcd, ammo); // rocket and ammo generation - _stats.wave_draw(lcd, wave_counter); // wave counter generation + _stats.check_star(lcd, star); // star generation + _stats.check_rocket(lcd, ammo); // rocket generation + _stats.draw_wave_counter(lcd, wave_counter); // wave counter generation _friendly.draw(lcd); // friendly ship generation - ships_draw(lcd); // enemy ships generation + _enemy1.draw(lcd); + _enemy2.draw(lcd); + _enemy3.draw(lcd); + _enemy4.draw(lcd); + _enemy5.draw(lcd); + _enemy6.draw(lcd); // enemy ships generation } - -// Enemy ships generation: - -void Engine::ships_draw(N5110 &lcd) -{ - _ship1.draw(lcd); - _ship2.draw(lcd); - _ship3.draw(lcd); - _ship4.draw(lcd); - _ship5.draw(lcd); - _ship6.draw(lcd); -} - - // State change checker: -void Engine::checker(N5110 &lcd, Gamepad &pad) +void Engine::check_all(N5110 &lcd, Gamepad &pad) { - check_pass(pad); // checks if enemy passed screen border and generates another - check_death_all(lcd, pad); // checks for collisions and eventual friendly death - level_two(lcd, pad); // checks if level two has been reached, same for below - level_three(lcd, pad); - level_four(lcd, pad); - level_five(lcd, pad); + check_enemy_pass(pad); // checks if enemy passed screen border and generates another + check_death_all(lcd, pad); // checks for collisions and eventual friendly death + check_rocket(); // checks if rockets should be replenished + check_star(); // checks if star should be replenished + check_level_two(lcd, pad); // checks if level two has been reached, same for below + check_level_three(lcd, pad); + check_level_four(lcd, pad); + check_level_five(lcd, pad); + check_pause(lcd, pad); + check_mode_toggle(lcd, pad); } // Dynamic object position/velocity updater: -void Engine::update(N5110 &lcd, Gamepad &pad) +void Engine::update_all(N5110 &lcd, Gamepad &pad) { _friendly.update(_d,_mag); - _ship1.update(); - _ship2.update(); - _ship3.update(); - _ship4.update(); - _ship5.update(); - _ship6.update(); + _friendly.check_pos(); + _enemy1.update(); + _enemy2.update(); + _enemy3.update(); + _enemy4.update(); + _enemy5.update(); + _enemy6.update(); } // Function to enable shooting and eliminating enemy ships: -void Engine::shoot(N5110 &lcd, Gamepad &pad) +void Engine::shoot_rocket(N5110 &lcd, Gamepad &pad) { Vector2D friendly_pos = _friendly.get_pos(); - _x = friendly_pos.x+6; - _y = friendly_pos.y+3; - _bullet.init(_x, _y); + int _x = friendly_pos.x+6; + int _y = friendly_pos.y+3; + _rocket.init(_x, _y); if ((pad.check_event(Gamepad::B_PRESSED) == true) && (ammo > 0)) { - trigger = true; + rocket_shot_trigger = true; } - if (trigger == true) + if (rocket_shot_trigger == true) { - _bullet.draw(lcd); + _rocket.draw(lcd); check_enemy_death(pad); pad.tone(1500.0,0.1); ammo = ammo - 1; - trigger = false; + rocket_shot_trigger = false; + } +} + + +void Engine::shoot_star(N5110 &lcd, Gamepad &pad) +{ + if ((pad.check_event(Gamepad::A_PRESSED) == true) && + (star == true)) + { + _enemy1.init(_speed); + _enemy2.init(_speed); + _enemy3.init(_speed); + _enemy4.init(_speed); + _enemy5.init(_speed); + _enemy6.init(_speed); + wave_counter = wave_counter + 1; + pad.tone(2000.0,0.5); + star = false; } } -// Checks if (each) enemy ship passed off screen and re-initializes ones that have: (Wave counter associated with ship1) +// Checks if (each) enemy ship passed off screen and re-initializes ones that have: (Wave counter associated with enemy1) -void Engine::check_pass(Gamepad &pad) +void Engine::check_enemy_pass(Gamepad &pad) { - Vector2D ship1_pos = _ship1.get_pos(); + Vector2D enemy1_pos = _enemy1.get_pos(); - if (ship1_pos.x < 0) + if (enemy1_pos.x < 0) { - _ship1.init(_speed); + _enemy1.init(_speed); wave_counter = wave_counter + 1; + rocket_regen_trigger = false; + star_regen_trigger = false; } - Vector2D ship2_pos = _ship2.get_pos(); + Vector2D enemy2_pos = _enemy2.get_pos(); - if (ship2_pos.x < 0) + if (enemy2_pos.x < 0) { - _ship2.init(_speed); + _enemy2.init(_speed); } - Vector2D ship3_pos = _ship3.get_pos(); + Vector2D enemy3_pos = _enemy3.get_pos(); - if (ship3_pos.x < 0) + if (enemy3_pos.x < 0) { - _ship3.init(_speed); + _enemy3.init(_speed); } - Vector2D ship4_pos = _ship4.get_pos(); + Vector2D enemy4_pos = _enemy4.get_pos(); - if (ship4_pos.x < 0) + if (enemy4_pos.x < 0) { - _ship4.init(_speed); + _enemy4.init(_speed); } - Vector2D ship5_pos = _ship5.get_pos(); + Vector2D enemy5_pos = _enemy5.get_pos(); - if (ship5_pos.x < 0) + if (enemy5_pos.x < 0) { - _ship5.init(_speed); + _enemy5.init(_speed); } - Vector2D ship6_pos = _ship6.get_pos(); + Vector2D enemy6_pos = _enemy6.get_pos(); - if (ship6_pos.x < 0) + if (enemy6_pos.x < 0) { - _ship6.init(_speed); + _enemy6.init(_speed); } } @@ -177,45 +196,45 @@ if (friendly_pos.y < 5) { - _ship1.init(_speed); + _enemy1.init(_speed); } else if ((friendly_pos.y < 11) && (friendly_pos.y > 4)) { - _ship2.init(_speed); + _enemy2.init(_speed); } else if ((friendly_pos.y < 17) && (friendly_pos.y > 10)) { - _ship3.init(_speed); + _enemy3.init(_speed); } else if ((friendly_pos.y < 25) && (friendly_pos.y > 16)) { - _ship4.init(_speed); + _enemy4.init(_speed); } else if ((friendly_pos.y < 31) && (friendly_pos.y > 24)) { - _ship5.init(_speed); + _enemy5.init(_speed); } else { - _ship6.init(_speed); + _enemy6.init(_speed); } } // Checks for collisions between friendly and enemy ship: (Associates collisions counter) -void Engine::check_death(Gamepad &pad, Vector2D ship_pos) +void Engine::check_friendly_death(Gamepad &pad, Vector2D enemy_pos) { Vector2D friendly_pos = _friendly.get_pos(); - if ((friendly_pos.y >= ship_pos.y-5) && // change 5 to friendly size and 6 to ship size - (friendly_pos.y <= ship_pos.y+5) && - (friendly_pos.x+6 >= ship_pos.x) && - (friendly_pos.x+6 <= ship_pos.x+5)) + if ((friendly_pos.y >= enemy_pos.y-5) && // change 5 to friendly size and 6 to ship size + (friendly_pos.y <= enemy_pos.y+5) && + (friendly_pos.x+6 >= enemy_pos.x) && + (friendly_pos.x+6 <= enemy_pos.x+5)) { pad.tone(800.0,0.1); collisions = collisions + 1; @@ -227,31 +246,76 @@ void Engine::check_death_all(N5110 &lcd, Gamepad &pad) { - Vector2D ship1_pos = _ship1.get_pos(); - Vector2D ship2_pos = _ship2.get_pos(); - Vector2D ship3_pos = _ship3.get_pos(); - Vector2D ship4_pos = _ship4.get_pos(); - Vector2D ship5_pos = _ship5.get_pos(); - Vector2D ship6_pos = _ship6.get_pos(); + Vector2D enemy1_pos = _enemy1.get_pos(); + Vector2D enemy2_pos = _enemy2.get_pos(); + Vector2D enemy3_pos = _enemy3.get_pos(); + Vector2D enemy4_pos = _enemy4.get_pos(); + Vector2D enemy5_pos = _enemy5.get_pos(); + Vector2D enemy6_pos = _enemy6.get_pos(); - check_death(pad, ship1_pos); - check_death(pad, ship2_pos); - check_death(pad, ship3_pos); - check_death(pad, ship4_pos); - check_death(pad, ship5_pos); - check_death(pad, ship6_pos); - game_over(lcd, pad); // game over sequence, if health subzero + check_friendly_death(pad, enemy1_pos); + check_friendly_death(pad, enemy2_pos); + check_friendly_death(pad, enemy3_pos); + check_friendly_death(pad, enemy4_pos); + check_friendly_death(pad, enemy5_pos); + check_friendly_death(pad, enemy6_pos); + check_gameover(lcd, pad); // game over sequence, if health subzero } +// + +void Engine::check_rocket() +{ + if ((ammo < 3) && + (rocket_regen_trigger == false)) + { + if ((wave_counter == 5) || + (wave_counter == 10) || + (wave_counter == 15) || + (wave_counter == 20) || + (wave_counter == 25) || + (wave_counter == 30) || + (wave_counter == 40) || + (wave_counter == 50) || + (wave_counter == 75) || + (wave_counter == 100) || + (wave_counter == 150) || + (wave_counter == 200)) + { + ammo = ammo + 1; + rocket_regen_trigger = true; + } + } +} + +void Engine::check_star() +{ + if ((star == false) && + (star_regen_trigger == false)) + { + if ((wave_counter == 5) || + (wave_counter == 25) || + (wave_counter == 50) || + (wave_counter == 100) || + (wave_counter == 150) || + (wave_counter == 200)) + { + star = true; + star_regen_trigger = true; + } + } +} + + // Level two sequence, occurs if wave 5 is reached: -void Engine::level_two(N5110 &lcd, Gamepad &pad) +void Engine::check_level_two(N5110 &lcd, Gamepad &pad) { if (wave_counter == 5) { lcd.drawRect(0,0,84,48,FILL_WHITE); - lcd.printString("Nice! Level 2",0,1); + lcd.printString(" Nice! Level 2",0,1); lcd.printString(" Press Back! ",0,4); lcd.refresh(); wait(1); @@ -268,12 +332,12 @@ // Level three sequence, occurs if wave 25 is reached: -void Engine::level_three(N5110 &lcd, Gamepad &pad) +void Engine::check_level_three(N5110 &lcd, Gamepad &pad) { if (wave_counter == 25) { lcd.drawRect(0,0,84,48,FILL_WHITE); - lcd.printString("Nice! Level 3",0,1); + lcd.printString(" Nice! Level 3",0,1); lcd.printString(" Press Back! ",0,4); lcd.refresh(); wait(1); @@ -290,12 +354,12 @@ // Level three sequence, occurs if wave 50 is reached: -void Engine::level_four(N5110 &lcd, Gamepad &pad) +void Engine::check_level_four(N5110 &lcd, Gamepad &pad) { if (wave_counter == 50) { lcd.drawRect(0,0,84,48,FILL_WHITE); - lcd.printString("Nice! Level 4",0,1); + lcd.printString(" Nice! Level 4",0,1); lcd.printString(" Press Back! ",0,4); lcd.refresh(); wait(1); @@ -312,12 +376,12 @@ // Level five sequence, occurs if wave 100 is reached: -void Engine::level_five(N5110 &lcd, Gamepad &pad) +void Engine::check_level_five(N5110 &lcd, Gamepad &pad) { if (wave_counter == 100) { lcd.drawRect(0,0,84,48,FILL_WHITE); - lcd.printString("5. Good Luck!",0,1); + lcd.printString(" 5. Good Luck!",0,1); lcd.printString(" Press Back! ",0,4); lcd.refresh(); wait(1); @@ -332,25 +396,62 @@ } +// Pause sequence, checks if the game has been paused/unpaused + +void Engine::check_pause(N5110 &lcd, Gamepad &pad) +{ + if ((pad.check_event(Gamepad::START_PRESSED) == true) && + (pauses > 0)) + { + while (pad.check_event(Gamepad::START_PRESSED) == false) { + pad.leds_on(); + lcd.inverseMode(); + wait(0.5); + pad.leds_off(); + lcd.normalMode(); + wait(0.5); + } + pauses = pauses - 1; + } +} + + +void Engine::check_mode_toggle(N5110 &lcd, Gamepad &pad) +{ + if (pad.check_event(Gamepad::R_PRESSED) == true) { + lcd.normalMode(); + pad.tone(1000.0,0.2); + } + + if (pad.check_event(Gamepad::L_PRESSED) == true) { + lcd.inverseMode(); + pad.tone(1000.0,0.2); + } +} + + // Game over sequence, ends game if health is below zero: -void Engine::game_over(N5110 &lcd, Gamepad &pad) +void Engine::check_gameover(N5110 &lcd, Gamepad &pad) { if (collisions >= 6) { lcd.drawRect(0,0,84,48,FILL_WHITE); + char buffer[14]; + int length = sprintf(buffer," Score: %2d",wave_counter); + lcd.printString(buffer,0,2); lcd.printString(" You Lose! ",0,1); lcd.printString(" Press Back! ",0,4); lcd.refresh(); wait(1); - while (pad.check_event(Gamepad::BACK_PRESSED) == false) { wait(0.1); } - init(LEVEL_ONE, lcd, pad); collisions = 0; wave_counter = 0; ammo = 3; + pauses = 3; + star = true; } } \ No newline at end of file
--- a/Engine.h Mon May 01 13:01:57 2017 +0000 +++ b/Engine.h Tue May 02 22:13:10 2017 +0000 @@ -4,73 +4,262 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -#include "Ship1.h" -#include "Ship2.h" -#include "Ship3.h" -#include "Ship4.h" -#include "Ship5.h" -#include "Ship6.h" +#include "Enemy1.h" +#include "Enemy2.h" +#include "Enemy3.h" +#include "Enemy4.h" +#include "Enemy5.h" +#include "Enemy6.h" #include "Friendly.h" -#include "Bullet.h" +#include "Rocket.h" #include "Stats.h" -// gap from edge of screen -#define GAP 2 - class Engine { public: + + /// Constructor and destructor: Engine(); ~Engine(); + + //////////////////////////////// + //////// PUBLIC VARIABLES + //////////////////////////////// + + + /// Integer variable that stores the collisions the friendly ship has with the enemy ships: int collisions; + + /// Integer variable that stores the number of the wave the player is currently in (or the number of waves survived): int wave_counter; + + /// Boolean variable that stores if the player has a star available or not: + bool star; + + /// Integer variable that stores the number of rockets the player has available: int ammo; - bool trigger; - int _x; - int _y; - + + /// Integer variable that stores the number of pauses the player has available: + int pauses; + + + /// Boolean variable that stores if a rocket has been shot or not: + bool rocket_shot_trigger; + + /// Boolean variable that stores if a rocket has been regenerated or not: + bool rocket_regen_trigger; + + /// Boolean variable that stores if a star has been regenerated or not: + bool star_regen_trigger; + + + //////////////////////////////// + //////// PUBLIC METHODS + //////////////////////////////// + + + /** Initialize Ships + * + * Initializes friendly and enemy ships' velocity (enemies) and x & y positions (both). + * @param speed - velocity of ship + */ void init(int speed, N5110 &lcd, Gamepad &pad); + + + /** Read Input + * + * Reads direction (_d) and magnitude (_mag) from gamepad analog stick. + */ void read_input(Gamepad &pad); - void checker(N5110 &lcd, Gamepad &pad); - void update(N5110 &lcd, Gamepad &pad); - void draw(N5110 &lcd); - void shoot(N5110 &lcd, Gamepad &pad); + + + /** Draw Elements + * + * Draws grid, health, weapons, wave counter, and friendly and enemy ships onto the LCD + */ + void draw_all(N5110 &lcd); + + + /** Check All + * + * Method that includes all other checking methods + */ + void check_all(N5110 &lcd, Gamepad &pad); + + + /** Update All + * + * Updates friendly and enemy ship parameters (position), as well as making sure the friendly ship doesn't go off screen + * by limiting its x and y positions. + */ + void update_all(N5110 &lcd, Gamepad &pad); + + + /** Shoot Rocket + * + * Triggers a rocket to be shot from the friendly ship, destroying enemy ship opposite, at the press of a button (B). + * Checks if rockets ("ammo" variable) available, draws rocket onto screen, triggers "check_enemy_death" method, subtracts 1 from + * "ammo", and outputs a sound. First of two weapon types. + */ + void shoot_rocket(N5110 &lcd, Gamepad &pad); + + + /** Shoot Star + * + * Triggers a star to be shot from the friendly ship, destroying all enemy ships, at the press of a button (A). + * Checks if star ("star" variable) available, sets "star" to false, and outputs a sound. Second of two weapon types. + */ + void shoot_star(N5110 &lcd, Gamepad &pad); private: - void ships_draw(N5110 &lcd); - void check_wall_collision(Gamepad &pad); - void check_friendly_collisions(Gamepad &pad); - void check_pass(Gamepad &pad); + + //////////////////////////////// + //////// PRIVATE VARIABLES + //////////////////////////////// + + + /// Integer variable that stores the speed of the enemy ships: + int _speed; + + /// Variable that stores the direction of the analog stick: + Direction _d; + + /// Floating point variable that stores the magnitude of the analog stick movement: + float _mag; + + /// Objects created: + Friendly _friendly; + Enemy1 _enemy1; + Enemy2 _enemy2; + Enemy3 _enemy3; + Enemy4 _enemy4; + Enemy5 _enemy5; + Enemy6 _enemy6; + Rocket _rocket; + Stats _stats; + + //////////////////////////////// + //////// PRIVATE METHODS + //////////////////////////////// + + + /** Check Enemy Pass + * + * Reinitializes enemy ships that have passed off-screen (x < 0) to their starting position. Increments wave counter + * (adds 1 to the "wave_counter" variable), then resets rocket and star regeneration trigger to false + * (sets "rocket_regen_trigger" and "star_regen_trigger" to false) to allow further regeneration at next wave. + */ + void check_enemy_pass(Gamepad &pad); + + + /** Check Enemy Death + * + * Reinitializes enemy ships that have been shot by a rocket to their starting position. + */ void check_enemy_death(Gamepad &pad); - void check_death(Gamepad &pad, Vector2D ship_pos); + + + /** Check Friendly Death + * + * Registers friendly collisions with an enemy ship (adds 1 to "collisions" variable). + */ + void check_friendly_death(Gamepad &pad, Vector2D ship_pos); + + + /** Check Death All + * + * Method that includes "check_friendly_death" method for all 6 enemy ships. + */ void check_death_all(N5110 &lcd, Gamepad &pad); - void game_over(N5110 &lcd, Gamepad &pad); - void level_two(N5110 &lcd, Gamepad &pad); - void level_three(N5110 &lcd, Gamepad &pad); - void level_four(N5110 &lcd, Gamepad &pad); - void level_five(N5110 &lcd, Gamepad &pad); - void wave_draw(N5110 &lcd); + - Friendly _friendly; + /** Check Rocket + * + * Regenerates rockets (adds 1 to "ammo" variable) at certain waves, if "rocket_regen_trigger" is false, and + * the player has less than 3 rockets already, as the maximum is 3 (only executes if "ammo" is less than 3). + * Then sets "rocket_regen_trigger" to true to prevent excessive rocket regeneration. + */ + void check_rocket(); + - int _speed; - + /** Check Star + * + * Regenerates star (sets "star" variable to true) at certain waves, if "star_regen_trigger" is false, and + * the player does not already have a star, as the maximum is 1 (only executes if "star" is false). Then sets + * "star_regen_trigger" to true to prevent excessive star regeneration. + */ + void check_star(); + + + /** Check Level 2 + * + * Moves on to level 2 if wave 5 has been reached. A dialog box is drawn onto the LCD, and the player can move on + * to the next level by pressing a button (BACK). Reinitializes the friendly ship at it starting position, and the + * enemy ships at their starting positions at an elevated speed (at LEVEL_TWO, which is defined as 3). + * Sets the wave to 6 (sets "wave_counter" variable to 6). + */ + void check_level_two(N5110 &lcd, Gamepad &pad); + + + /** Check Level 3 + * + * Moves on to level 3 if wave 25 has been reached. A dialog box is drawn onto the LCD, and the player can move on + * to the next level by pressing a button (BACK). Reinitializes the friendly ship at it starting position, and the + * enemy ships at their starting positions at an elevated speed (at LEVEL_THREE, which is defined as 4). + * Sets the wave to 26 (sets "wave_counter" variable to 26). + */ + void check_level_three(N5110 &lcd, Gamepad &pad); + + + /** Check Level 4 + * + * Moves on to level 4 if wave 50 has been reached. A dialog box is drawn onto the LCD, and the player can move on + * to the next level by pressing a button (BACK). Reinitializes the friendly ship at it starting position, and the + * enemy ships at their starting positions at an elevated speed (at LEVEL_FOUR, which is defined as 5). + * Sets the wave to 51 (sets "wave_counter" variable to 51). + */ + void check_level_four(N5110 &lcd, Gamepad &pad); - Ship1 _ship1; - Ship2 _ship2; - Ship3 _ship3; - Ship4 _ship4; - Ship5 _ship5; - Ship6 _ship6; - Bullet _bullet; - Stats _stats; - - Direction _d; - float _mag; - + + /** Check Level 5 + * + * Moves on to level 5 if wave 100 has been reached. A dialog box is drawn onto the LCD, and the player can move on + * to the next level by pressing a button (BACK). Reinitializes the friendly ship at it starting position, and the + * enemy ships at their starting positions at an elevated speed (at LEVEL_FIVE, which is defined as 6). + * Sets the wave to 101 (sets "wave_counter" variable to 101). + */ + void check_level_five(N5110 &lcd, Gamepad &pad); + + + /** Check Pause + * + * Pauses the game if a button (START) is pressed, and the player has remaining pauses to use ("pause" variable is > 0). + * Flashes the pad's LEDs and switches the LCD's mode between normal and inverse until a button (START) is pressed again. + * Once unpaused, removes one pause from the player (subtracts 1 from the "pauses" variable). + */ + void check_pause(N5110 &lcd, Gamepad &pad); + + + /** Check LCD Mode + * + * Toggles 'night' mode (LCD's inverse mode) if a button (LEFT) is pressed. Sets the mode back to normal (LCD's normal mode) + * if a button (RIGHT) is pressed. + */ + void check_mode_toggle(N5110 &lcd, Gamepad &pad); + + + /** Check for Gameover Sequence + * + * Ends the game if the player has no lives remaining ("collisions" variable is above 5). A dialog box is printed onto the LCD, + * showing the player's score (waves survived). Once a button is pressed (BACK), the friendly ship is reinitialized at its + * starting position, and the enemy ships at their starting positions at the initial speed (at LEVEL_ONE, which is defined as 2). + * + */ + void check_gameover(N5110 &lcd, Gamepad &pad); + }; #endif \ No newline at end of file