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.
Dependencies: mbed
Diff: bullet/bullet.h
- Revision:
- 54:095eae44895b
- Parent:
- 53:db66345d6755
diff -r db66345d6755 -r 095eae44895b bullet/bullet.h
--- a/bullet/bullet.h Mon Apr 22 15:10:02 2019 +0000
+++ b/bullet/bullet.h Fri Apr 26 00:19:57 2019 +0000
@@ -9,89 +9,89 @@
/** bullet Class
@author Laila Al Badwawi, University of Leeds
-@brief Controls the bullet in the SpaceInvaders game
+@brief Controls the bullet in the SpaceInvaders game
@date April 2019
-*/
+*/
-class bullet
+class bullet
{
public:
// constructors
- //string Variables of this type are able to store sequences of characters,
- //such as words or sentences.
- /**
- *@constucter creat a defult bullet
- */
-
- bullet(); //constructor
- ~bullet(); //destructor
-
-/*mutators
- //mutator methods defined as methods which advice the users of the class
- //to change the value of a member variable in a controlled manner.
- Their names are usually pre-fixed with set_ to make this behaviour clear.*/
-
- /**
- *@brief initialise an identity for the bullet
- *@param size @details size of bullet in intger
- *@param speed @details the speed of bulletin integer
- */
+ //string Variables of this type are able to store sequences of characters,
+ //such as words or sentences.
+ /**
+ *@constucter creat a defult bullet
+ */
+
+ bullet(); //constructor
+ ~bullet(); //destructor
+
+ /*mutators
+ //mutator methods defined as methods which advice the users of the class
+ //to change the value of a member variable in a controlled manner.
+ Their names are usually pre-fixed with set_ to make this behaviour clear.*/
+
+ /**
+ *@brief initialise an identity for the bullet
+ *@param size @details size of bullet in intger
+ *@param speed @details the speed of bulletin integer
+ */
void init(int size,int speed);
- /**
- *@brief drawing the bullet
- *@param draw @details drawing the bullet by using N5110&lcd librarieas
- **/
-
+ /**
+ *@brief drawing the bullet
+ *@param draw @details drawing the bullet by using N5110&lcd librarieas
+ **/
+
void draw(N5110 &lcd);
- /**
- *@brief updating the position of the bullet
- *@param update @details update the position of the bullet.
- **/
- void update();
-
- /**
- *@brief sitting up the velocity the of the bullet
- *@param _velocity @details set the velocity the of the bullet in Vector2D
- **/
+ /**
+ *@brief updating the position of the bullet
+ *@param update @details update the position of the bullet.
+ **/
+ void update();
+
+ /**
+ *@brief sitting up the velocity the of the bullet
+ *@param _velocity @details set the velocity the of the bullet in Vector2D
+ **/
void set_velocity(Vector2D v);
- /**
- *@brief sitting up the position the of the bullet
- *@param _pos @details set the position the of the bullet in Vector2D
- **/
+ /**
+ *@brief sitting up the position the of the bullet
+ *@param _pos @details set the position the of the bullet in Vector2D
+ **/
void set_pos(Vector2D p);
-
- /**
- *@brief sitting up the velocity the of the bullet
- *@return the velocity of the bullet in Vector2D
- **/
- Vector2D get_pos();
- /**
- *@brief sitting up the position the of the bullet
- *@return the postion of the bullet in Vector2D
- **/
- Vector2D get_velocity();
-
- private:
-//member variables
-//parameters
+
+ /**
+ *@brief sitting up the velocity the of the bullet
+ *@return the velocity of the bullet in Vector2D
+ **/
+ Vector2D get_pos();
+ /**
+ *@brief sitting up the position the of the bullet
+ *@return the postion of the bullet in Vector2D
+ **/
+ Vector2D get_velocity();
-/*@param
- _velocity
- */
+private:
+//member variables
+//parameters
+
+ /*@param
+ _velocity
+ */
Vector2D _velocity; // declation of a variable member _velocity which shows the velocity of the Alien in Vector2D.
- /*@param
-_size
- */
+ /*@param
+ _size
+ */
int _size; // declation of a variable member _size which shows the size of the Alien.
- /*@param
-_x
- */
-
+ /*@param
+ _x
+ */
+
int _x; ////declation of a variable member _x which shows the x-cooridante of the Alien.
/*@param
-_y
- */
+ _y
+ */
int _y; //declation of a variable member _y which shows the y-cooridante of the Alien.
};