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: My_game_clases/Functions.h
- Revision:
- 25:b0c1d7955678
- Parent:
- 24:74a53dd49806
diff -r 74a53dd49806 -r b0c1d7955678 My_game_clases/Functions.h
--- a/My_game_clases/Functions.h Mon May 18 11:27:07 2020 +0000
+++ b/My_game_clases/Functions.h Tue May 19 09:14:10 2020 +0000
@@ -31,7 +31,7 @@
int delta_r[10];/**< Holds ball's radiuss value(int)*/
};
-/**Function class
+/**Functions class
* @brief Contains the game engine
* @author Arturs Kozlovskis
* @date April,2020
@@ -44,74 +44,74 @@
/** Draw parabolic ball
* @param N5110 class object
- * @param Object class object
+ * @param Objects class object
* @param Gamepad class object
- * @param chosen ball(int)
+ * @param c tell the function which ball to chose from(int)
*/
void ball_position_parabolic( N5110 &lcd, Objects &objects,Gamepad &pad, int c);//governs the balls movement in a parabolic way
/** Draw linear ball
* @param N5110 class object
- * @param Object class object
+ * @param Objects class object
* @param Gamepad class object
- * @param chosen ball(int)
+ * @param c tell the function which ball to chose from(int)
*/
void ball_position_linear (N5110 &lcd, Objects &objects,Gamepad &pad, int c);//governs the balls movement in a linear way
/** Check for collisions
* @param N5110 class object
- * @param Object class object
+ * @param Objects class object
* @param Gamepad class object
*/
void collision_checker(N5110 &lcd,Objects &objects,Gamepad &pad);//checks if the shot has coma into contact with the ball
/** Find the collided ball(linear)
- * @param x value of pixel that cause the collision
- * @param y value of pixel that cause the collision
+ * @param x value of pixel that caused the collision
+ * @param y value of pixel that caused the collision
*/
void ball1_finder(int x, int y);//checks which ball has been hit by a shot and then decreses it size(linear)
/** Find the collided ball(parabolic)
- * @param x value of pixel that cause the collision
- * @param y value of pixel that cause the collision
+ * @param x value of pixel that caused the collision
+ * @param y value of pixel that caused the collision
*/
void ball_finder(int x, int y);//checks which ball has been hit by a shot and then decreses it size(parabolic)
/**Check if cannon has been hit
* @param N5110 class object
- * @param Object class object
- * @return if collision has happened(bool)
+ * @param Objects class object
+ * @return bool if collision has happened or not(bool)
*/
bool cannon_smash(N5110 &lcd,Objects &objects);// checks if the cannon has crashed with anything
/** Generate a random value
* @param Gamepad class object
- * @return the random value(int)
+ * @return a random value in range of 0 to 100(int)
*/
int random(Gamepad &pad);//generates a random number
/**Govern the linear ball movement and creation
* @param N5110 class object
- * @param Object class object
+ * @param Objects class object
* @param Gamepad class object
*/
void ball_creater_linear(N5110 &lcd, Objects &objects, Gamepad &pad);//controls ball making and their movement equations
/**Govern the parabolic ball movement and creation
* @param N5110 class object
- * @param Object class object
+ * @param Objects class object
* @param Gamepad class object
*/
void ball_creater_parabolic(N5110 &lcd, Objects &objects, Gamepad &pad);//controls ball making and their movement
/**Round a value
- * @param the number that needs rounding
- * @return rounded value
+ * @param Number value that needs rounding
+ * @return a rounded value of passed value
*/
int round(float number); //rounds a number
/**Get score
- * @return the current score
+ * @return the players current score
*/
int get_score();//gets the players score