Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
18:11068b98e261
Parent:
15:90b6821bcf64
Child:
21:f7d7834e3af1
--- a/Map/Map_test.h	Wed Apr 29 12:35:14 2020 +0000
+++ b/Map/Map_test.h	Fri May 01 20:37:10 2020 +0000
@@ -1,33 +1,30 @@
 #ifndef MAP_TEST_H
 #define MAP_TEST_H
 
-// Objects reqired for test ----------------------------------------------------
-Gamepad pad;
-N5110 lcd;
-Map map;
 
 /** Map Test
-@brief Checks that the map moves to the correct x position depedning on map_move input.
-Also checks that map can go to required range of x positions.
+@brief Checks that the map moves to the correct x position depedning on joystick input
 @author Benjamin Evans, University of Leeds
 @date April 2020
 @return true if test are passed 
 */
 
-bool map_move_test(int move_map, int expected_x_position){
+bool map_move_test(Direction d_, int expected_x_position){
     // Objects reqired for test ------------------------------------------------
     Gamepad pad;
     Map map;
+    GameEngine engine;
+    N5110 lcd;
     
     // Initialise map in start postion of -84,42
     pad.init();
     map.init(pad); 
     
-    printf("move map = %d : ", move_map);
+    printf("Espected map x position = %d, : ",expected_x_position);
     
     // Draws map but with move variable set so it starts above 0
     // As can't rea pixel of the LCD
-    map.draw_map(lcd, move_map);
+    map.draw_map(lcd, d_);
     
     //Reads start postion of map drawn
     int map_start_draw_postion = map.get_position_x_map();