Nemesis game, rocket
Revision 11:7734b721ed43, committed 2017-05-03
- Comitter:
- musallambseiso
- Date:
- Wed May 03 20:03:37 2017 +0000
- Parent:
- 10:71e2de3ae034
- Commit message:
- Removed redundant code, perfected Doxygen, added inline comments.
Changed in this revision
Rocket.cpp | Show annotated file Show diff for this revision Revisions of this file |
Rocket.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 71e2de3ae034 -r 7734b721ed43 Rocket.cpp --- a/Rocket.cpp Tue May 02 22:13:39 2017 +0000 +++ b/Rocket.cpp Wed May 03 20:03:37 2017 +0000 @@ -8,13 +8,18 @@ { } + +// Initializion method: + void Rocket::init(int x, int y) { - - _x = x; + _x = x; // X and y coordinates input when method is used. _y = y; } + +// Draws rocket onto LCD: + void Rocket::draw(N5110 &lcd) { lcd.drawLine(_x,_y,_x+78,_y,1);
diff -r 71e2de3ae034 -r 7734b721ed43 Rocket.h --- a/Rocket.h Tue May 02 22:13:39 2017 +0000 +++ b/Rocket.h Wed May 03 20:03:37 2017 +0000 @@ -6,6 +6,17 @@ #include "Gamepad.h" #include "Friendly.h" +/** Rocket Class +@brief Used for generating the rocket (first weapon type) in the Nemesis game. Includes drawing functions. +@brief Incorporates N5110.h file by Craig A. Evans. + +@brief Revision 1.0 + +@author Musallam M. M. Bseiso +@date 3rd May 2017 +*/ + + class Rocket { @@ -31,6 +42,8 @@ /** Draw Rocket * * Draws the rocket onto the LCD, in accordance with the parameters initialized in the "init" method. + * @param N5110 - nokia LCD library + * @param lcd - pointer to nokia LCD library */ void draw(N5110 &lcd);