
game for collection
Diff: main.cpp
- Revision:
- 1:a321707cc6df
- Parent:
- 0:4f5260a82a77
- Child:
- 2:fe4b9d530a8b
--- a/main.cpp Sun Apr 26 03:47:56 2020 +0000 +++ b/main.cpp Mon Apr 27 15:20:40 2020 +0000 @@ -4,11 +4,13 @@ #include "N5110.h" #include "PongEngine.h" - +#ifdef WITH_TESTING +# include "tests.h" +#endif -#define PADDLE_WIDTH 8 +#define PADDLE_WIDTH 2 #define PADDLE_HEIGHT 8 -#define BALL_SIZE 4 +#define BALL_SIZE 2 #define BALL_SPEED 3 /////////////// structs ///////////////// @@ -30,7 +32,11 @@ ///////////// functions //////////////// int main() { +#ifdef WITH_TESTING + int number_of_failures = run_all_tests(); + if(number_of_failures > 0) return number_of_failures; +#endif int fps = 8; // frames per second