
Final Commit
Dependencies: mbed
Diff: main.cpp
- Revision:
- 7:c38800a428a6
- Parent:
- 6:f3f508cea1c4
- Child:
- 8:a2b431b9b3f7
--- a/main.cpp Fri Mar 16 13:02:55 2018 +0000 +++ b/main.cpp Wed Mar 21 13:09:20 2018 +0000 @@ -5,6 +5,9 @@ #include "Testing.h" #include "SnakeEngine.h" +#define FOOD_X 10 +#define FOOD_Y 10 + struct UserInput { @@ -14,8 +17,7 @@ /* ELEC2645 Embedded Systems Project -School -of Electronic & Electrical Engineering +School of Electronic & Electrical Engineering University of Leeds Name: Joshua Robert Marshall Username: ll13jrm @@ -39,38 +41,11 @@ int main() { - // ----- Testing Program ----- - while(1){ + while(1) { - - if(test.food_test_position()) { - - printf("Passed position test \n"); + printf("Nothing"); } - - else { - - printf("Failed position test \n"); - - } - - if(test.food_test_range()) { - - printf("Passed Range Test \n"); - - } - - else { - - printf("Failed Range Test \n"); - - } - - wait(1.0); - - } - } // initialies all classes and libraries @@ -81,7 +56,7 @@ pad.init(); // initialise the game with food, snake... - // snake_engine.init( ); + snake_engine.init(FOOD_X, FOOD_Y); }