Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Map/Map.h
- Revision:
- 14:7419c680656f
- Parent:
- 13:12276eed13ac
- Child:
- 15:90b6821bcf64
--- a/Map/Map.h Sun Apr 26 17:08:10 2020 +0000
+++ b/Map/Map.h Sun Apr 26 20:31:53 2020 +0000
@@ -20,13 +20,22 @@
/** Destructor */
~Map();
- /** Initalises Spaceship */
+ /** Initalises Spaceship
+ * @param pad @details Gampad object
+ */
void init(Gamepad &pad);
- /** Draws map out of combination of random hight traingle and random length lines so map is differnt each new game and loops roudn at ends
- * @param LCD object, move_map variable
+ /** Draws map out of combination of random hight traingle and random
+ * length lines so map is differnt each new game and loops roudn at ends
+ * @param lcd, move_map @details N5110 object and variable to move x postion of map
*/
void draw_map(N5110 &lcd, int move_map);
+
+ /** Gets 11 random integers for random lengths and hights arrays
+ * and fills arrays with the random integers so same random map is drawn each frame
+ * @param Pad @details Gampad adc object used to generate seed
+ */
+ void fill_random_arrays(Gamepad &pad);
// Accessors and mutators ----------------------------------------------
@@ -38,29 +47,23 @@
private:
// Functions prototypes ------------------------------------------------
- /** Gets 11 random integers for random lengths and hights arrays
- * and stores in array so same random ma is drawn each frame
- * @param RandGen object
- */
- void get_random_arrays(Gamepad &pad);
-
/** Draws a triangle from position with specified hight wich represents a mountain of the map
- * @param LCD object, Hight of trangle
+ * @param lcd, tirangle_height @details N5110 object and teh random hight of triangle produced
*/
- void draw_triangle(N5110 &lcd, int triangle_hight);
+ void draw_triangle(N5110 &lcd, int triangle_height);
/** Draws a horizontal line with specified length to represent flat land on map
- * @param LCD object, Length of line
+ * @param lcd, tirangle_height @details N5110 object and random length of line produced
*/
void draw_line(N5110 &lcd, int line_length);
/** Duplicates the first part of the map to fill the gap when the map loops round
- * @ param LCD object
+ * @ param lcd @details N5110 object
*/
void check_duplicates_map_forward(N5110 &lcd);
/** Duplicates the last part of the map to fill the gap when the map loops round
- * @ param LCD object
+ * @ param lcd @details N5110 object
*/
void check_duplicates_map_backwards(N5110 &lcd);