Ben Evans University Second Year Project. Game Called Defender.

Dependencies:   mbed

https://os.mbed.com/media/uploads/evanso/84bc1a30759fd6a1e3f1fd1fae3e97c2.png

Hello, soldier, you have been specially selected as the defender of planet earth.

Your mission, if you choose to accept it. Fly around the planet and pulverise invading alien ships for as long as you can. Stop the aliens abducting the innocent people on the ground. Be warned if an alien ship manages to abduct a person and take them to top of the screen, they will no longer move randomly and will begin to hunt you down. This sounds like a challenge you were trained for.

But don’t worry soldier you’re not going into battle empty-handed. Your ship is equipped with a state of the art laser beam that has unlimited ammo and four smart bombs that will destroy anything on the screen. The ship also has three lives so use them wisely.

As time goes on more alien ships will arrive on planet earth increasing the difficulty of your mission. And remember the landscape bellow loops around so if you continually fly in the same direction you go to your original position. Good luck soldier.

Revision:
85:87bc28b151d8
Parent:
83:35d1e846eab2
Child:
87:832ca78426b5
--- a/test.h	Tue May 26 14:39:45 2020 +0000
+++ b/test.h	Tue May 26 19:38:48 2020 +0000
@@ -26,7 +26,7 @@
     printf ("\nTesting spaceship_movement_test() \n");
     int passed_counter = 0;
 
-    // Runs test with all posible movment directions 
+    // Runs test with all possible movement directions 
     if (spaceship_movement_test(CENTRE, 36, 22)) passed_counter++;
     if (spaceship_movement_test(N, 36, 21)) passed_counter++;
     if (spaceship_movement_test(NE, 35, 21)) passed_counter++;
@@ -87,7 +87,7 @@
     printf ("\nTesting alien_draw_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all posible movment directions 
+    // Runs test with all possible movement directions 
     if (alien_draw_test(1,CENTRE, 1, 1)) passed_counter++;
     if (alien_draw_test(1,N, 43, 20)) passed_counter++;
     if (alien_draw_test(0,NE, -23, 6)) passed_counter++;
@@ -106,7 +106,7 @@
     printf ("\nTesting alien_collision_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (check_collision_test(1, 1, 10,22)) passed_counter++;
     if (check_collision_test(0, 1, 28,40)) passed_counter++;
     if (check_collision_test(1, 0, 11,22)) passed_counter++;
@@ -180,7 +180,7 @@
     printf ("\nTesting check_alien_collision_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (check_alien_collision_test(1,1)) passed_counter++;
     if (check_alien_collision_test(1,80)) passed_counter++;
     if (check_alien_collision_test(1,-42)) passed_counter++;
@@ -199,7 +199,7 @@
     printf ("\nTesting menu_select_part_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (menu_select_part_test(play,1)) passed_counter++;
     if (menu_select_part_test(main_menu,0)) passed_counter++;
     
@@ -212,7 +212,7 @@
     printf ("\nTesting menu_scroll_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (menu_scroll_test(CENTRE, play)) passed_counter++;
     if (menu_scroll_test(N, settings)) passed_counter++;
     if (menu_scroll_test(NE, settings)) passed_counter++;
@@ -232,7 +232,7 @@
     printf ("\nmenu_draw_part_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (menu_draw_part_test(1, 42, 27)) passed_counter++;
     if (menu_draw_part_test(1, 41, 43)) passed_counter++;
     if (menu_draw_part_test(0, 9, 1)) passed_counter++;
@@ -252,7 +252,7 @@
     printf ("\nTesting HUD_draw_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (HUD_draw_test(3, 0, 4, 1, 3, 3)) passed_counter++;
     if (HUD_draw_test(3, 0, 4, 1, 12, 3)) passed_counter++;
     if (HUD_draw_test(1, 0, 4, 0, 12, 3)) passed_counter++;
@@ -275,7 +275,7 @@
     printf ("\nsaved_games_scroll_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (saved_games_scroll_test(CENTRE, 1)) passed_counter++;
     if (saved_games_scroll_test(N, 2)) passed_counter++;
     if (saved_games_scroll_test(NE, 2)) passed_counter++;
@@ -295,7 +295,7 @@
     printf ("\nTesting display_saved_games_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (display_saved_games_test(1, 41, 18 )) passed_counter++;
     if (display_saved_games_test(1, 41, 34)) passed_counter++;
     if (display_saved_games_test(1, 9, 1)) passed_counter++;
@@ -310,7 +310,7 @@
     printf ("\nTesting save_game_screen_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (save_game_screen_test(1, 41, 18 )) passed_counter++;
     if (save_game_screen_test(1, 41, 34)) passed_counter++;
     if (save_game_screen_test(1, 3, 1)) passed_counter++;
@@ -329,7 +329,7 @@
     printf ("\nTesting settings_select_part_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (settings_select_part_test(acc,1)) passed_counter++;
     if (settings_select_part_test(joy,0)) passed_counter++;
     
@@ -342,7 +342,7 @@
     printf ("\nsettings_scroll_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (settings_scroll_test(CENTRE, controls)) passed_counter++;
     if (settings_scroll_test(N, sound_fx)) passed_counter++;
     if (settings_scroll_test(NE, sound_fx)) passed_counter++;
@@ -362,7 +362,7 @@
     printf ("\ndisplay_settings_screen_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (display_settings_screen_test(1, 41, 18 )) passed_counter++;
     if (display_settings_screen_test(1, 41, 34)) passed_counter++;
     if (display_settings_screen_test(0, 9, 1)) passed_counter++;
@@ -382,7 +382,7 @@
     printf ("\nno_high_scores_test_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (no_high_scores_test(1, 0, 27)) passed_counter++;
     if (no_high_scores_test(1, 3, 35)) passed_counter++;
     if (no_high_scores_test(0, 9, 1)) passed_counter++;
@@ -402,7 +402,7 @@
     printf ("\nread_accelerometer_direction_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (read_accelerometer_direction_test(CENTRE,5,-40 )) passed_counter++;
     if (read_accelerometer_direction_test(N, 5,-10)) passed_counter++;
     if (read_accelerometer_direction_test(NE, 20, -10)) passed_counter++;
@@ -422,7 +422,7 @@
     printf ("\nspawn_aliens_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (spawn_aliens_test(1)) passed_counter++;
     if (spawn_aliens_test(3)) passed_counter++;
     if (spawn_aliens_test(5)) passed_counter++;
@@ -438,7 +438,7 @@
     printf ("\ncreate_aliens_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (create_alien_test(2)) passed_counter++;
     if (create_alien_test(4)) passed_counter++;
     if (create_alien_test(6)) passed_counter++;
@@ -454,7 +454,7 @@
     printf ("\ncreate_explosion_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (create_explosion_test(3)) passed_counter++;
     if (create_explosion_test(6)) passed_counter++;
     if (create_explosion_test(9)) passed_counter++;
@@ -469,7 +469,7 @@
     printf ("\ndraw_explosions_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (draw_explosions_test(1,32,33)) passed_counter++;
     if (draw_explosions_test(0,100,20)) passed_counter++;
     if (draw_explosions_test(1,1,20)) passed_counter++;
@@ -485,7 +485,7 @@
     printf ("\nspawn_people_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (spawn_people_test(1)) passed_counter++;
     if (spawn_people_test(2)) passed_counter++;
     if (spawn_people_test(3)) passed_counter++;
@@ -501,7 +501,7 @@
     printf ("\ncreate_people_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (create_people_test(1)) passed_counter++;
     if (create_people_test(2)) passed_counter++;
     if (create_people_test(3)) passed_counter++;
@@ -517,7 +517,7 @@
     printf ("\nreset_map_timer_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (reset_map_timer_test(CENTRE, true)) passed_counter++;
     if (reset_map_timer_test(N, false)) passed_counter++;
         
@@ -530,11 +530,11 @@
     printf ("\nreset_map_test() \n\n");
     int passed_counter = 0;
 
-    // Runs test with all differnt possible inputs
+    // Runs test with all different possible inputs
     if (reset_map_test()) passed_counter++;
         
     // Prints results
     printf ("\nreset_map_test() %d tests out of 1\n\n\n"
     ,passed_counter);
 }
-#endif
\ No newline at end of file
+#endif