finished p2-2
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
fruit_private.h@0:95264f964374, 2021-03-29 (annotated)
- Committer:
- DCchico
- Date:
- Mon Mar 29 21:17:26 2021 -0400
- Revision:
- 0:95264f964374
- Child:
- 1:05e3f86df6d5
inital commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DCchico |
0:95264f964374 | 1 | //================================================================= |
DCchico |
0:95264f964374 | 2 | // The header file defining the fruit module |
DCchico |
0:95264f964374 | 3 | // |
DCchico |
0:95264f964374 | 4 | // Copyright 2020 Georgia Tech. All rights reserved. |
DCchico |
0:95264f964374 | 5 | // The materials provided by the instructor in this course are for |
DCchico |
0:95264f964374 | 6 | // the use of the students currently enrolled in the course. |
DCchico |
0:95264f964374 | 7 | // Copyrighted course materials may not be further disseminated. |
DCchico |
0:95264f964374 | 8 | // This file must not be made publicly available anywhere. |
DCchico |
0:95264f964374 | 9 | //================================================================== |
DCchico |
0:95264f964374 | 10 | #ifndef FRUIT_PRIVATE_H |
DCchico |
0:95264f964374 | 11 | #define FRUIT_PRIVATE_H |
DCchico |
0:95264f964374 | 12 | |
DCchico |
0:95264f964374 | 13 | #include "mbed.h" |
DCchico |
0:95264f964374 | 14 | #include "globals.h" |
DCchico |
0:95264f964374 | 15 | #include "fruit_public.h" |
DCchico |
0:95264f964374 | 16 | |
DCchico |
0:95264f964374 | 17 | //==== [private settings] ==== |
DCchico |
0:95264f964374 | 18 | int FRUIT_INTERVAL = 10; |
DCchico |
0:95264f964374 | 19 | int FRUIT_SPEED = 5; |
DCchico |
0:95264f964374 | 20 | int FRUIT_SIZE = 10; |
DCchico |
0:95264f964374 | 21 | int PLAYER_SPACE = 20; |
DCchico |
0:95264f964374 | 22 | |
DCchico |
0:95264f964374 | 23 | //==== [private type] ==== |
DCchico |
0:95264f964374 | 24 | |
DCchico |
0:95264f964374 | 25 | //==== [private function] ==== |
DCchico |
0:95264f964374 | 26 | /** Generate a random fruit and add it to the fruit DLL |
DCchico |
0:95264f964374 | 27 | */ |
DCchico |
0:95264f964374 | 28 | void fruit_create(void); |
DCchico |
0:95264f964374 | 29 | /** Iterate over all fruit and update their positions using the rate of motion |
DCchico |
0:95264f964374 | 30 | * and the deltaX and deltaY generated by fruit create |
DCchico |
0:95264f964374 | 31 | */ |
DCchico |
0:95264f964374 | 32 | void fruit_update_position(void); |
DCchico |
0:95264f964374 | 33 | |
DCchico |
0:95264f964374 | 34 | #endif //FRUIT_PRIVATE_H |
DCchico |
0:95264f964374 | 35 | |
DCchico |
0:95264f964374 | 36 |