baseline features - a little buggy

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Committer:
robbiehuey
Date:
Sat Apr 10 02:08:02 2021 +0000
Revision:
2:cf4e61c051a4
Parent:
0:95264f964374
hi

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DCchico 0:95264f964374 1 // =================================================================
DCchico 0:95264f964374 2 // The header file is for module "compost pile"
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 /** @file compost_pile_public.h */
DCchico 0:95264f964374 11 #ifndef COMPOST_PILE_PUBLIC_H
DCchico 0:95264f964374 12 #define COMPOST_PILE_PUBLIC_H
DCchico 0:95264f964374 13
DCchico 0:95264f964374 14 // The structure to store the information of a compost
DCchico 0:95264f964374 15 typedef struct {
DCchico 0:95264f964374 16 int x; ///< Bottom-left corner of the compost. x coordinate on the screen.
DCchico 0:95264f964374 17 int y; ///< Bottom-left corner of the compost. y coordinate on the screen.
DCchico 0:95264f964374 18 int width; ///< The width of the compost. The shape of the compost is a rectangle.
DCchico 0:95264f964374 19 int height; ///< The height of the compost
DCchico 0:95264f964374 20 } COMPOST;
DCchico 0:95264f964374 21
DCchico 0:95264f964374 22 #define MAX_NUM_COMPOST_PILES 11
DCchico 0:95264f964374 23
DCchico 0:95264f964374 24 /** Call compost_pile_init() only once at the begining of your code
DCchico 0:95264f964374 25 Initialize every compost entry in the compost_record array, and also variable tallest_pile_height.
DCchico 0:95264f964374 26 These two things are defined in the compost_pile.cpp
DCchico 0:95264f964374 27 */
DCchico 0:95264f964374 28 void compost_pile_init();
DCchico 0:95264f964374 29
DCchico 0:95264f964374 30 /** Get the information of compost
DCchico 0:95264f964374 31 @param index The index in compost_record. It must be smaller than MAX_NUM_COMPOST_PILES.
DCchico 0:95264f964374 32 @return The structure of compost information
DCchico 0:95264f964374 33 */
DCchico 0:95264f964374 34 COMPOST compost_get_info(int index);
DCchico 0:95264f964374 35
DCchico 0:95264f964374 36 /** Make a pile of compost one unit taller
DCchico 0:95264f964374 37 @param index The index in compost_record. It must be smaller than MAX_NUM_COMPOST_PILES.
DCchico 0:95264f964374 38 */
DCchico 0:95264f964374 39 void compost_add(int index);
DCchico 0:95264f964374 40
DCchico 0:95264f964374 41 /** Draw all existing piles onto the screen (Iterate through the compost_record array)
DCchico 0:95264f964374 42 @brief You might not need to use this function, but you could still use it if you want.
DCchico 0:95264f964374 43 */
DCchico 0:95264f964374 44 void draw_compost(void);
DCchico 0:95264f964374 45
DCchico 0:95264f964374 46 /** Get height of tallest compost pile
DCchico 0:95264f964374 47 @brief You will need this function to determine the end of the game
DCchico 0:95264f964374 48 @return height of tallest compost pile as an int
DCchico 0:95264f964374 49 */
DCchico 0:95264f964374 50 int get_compost_tallest_height(void);
DCchico 0:95264f964374 51
DCchico 0:95264f964374 52 /** Get height of compost pile at given index
DCchico 0:95264f964374 53 @brief You will need this function to add fruits to compost
DCchico 0:95264f964374 54 @return height of tallest compost pile as an int
DCchico 0:95264f964374 55 */
DCchico 0:95264f964374 56 int get_compost_height(int index);
DCchico 0:95264f964374 57
DCchico 0:95264f964374 58 #endif //COMPOST_PILE_PUBLIC_H