ELEC2645 (2018/19) / Mbed 2 deprecated el17ntkv

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Badman.h Source File

Badman.h

00001 #ifndef BADMAN_H
00002 #define BADMAN_H
00003 
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Gamepad.h"
00007 
00008 
00009 /** Badman Class
00010 @author Mr Nigel TK Vere, University of Leeds
00011 @brief Controls and models the badman main character for the badman game
00012 @date April 2019
00013 */
00014 
00015 /** Badman Class
00016 
00017 @brief Controls and models the badman main character for the badman game
00018 
00019 @version 1.0
00020 
00021 @author Mr Nigel TK Vere
00022 
00023 @date April 2019
00024 
00025 
00026 */
00027 class Badman
00028 {
00029 
00030 public:
00031 
00032     /**
00033     * @brief Default Badman object constructor
00034 
00035     */
00036     Badman();
00037     /**
00038     * @brief Default Badman object destructor
00039 
00040     */
00041     ~Badman();
00042     /**
00043     * @brief Mutator method initialises the badman character object setting it's radius and start position in the maze
00044     * @param size @details Integer value giving the radius of our badman character object
00045     */
00046     void init(int size);
00047     /**
00048     * @brief Mutator method gets displays the badman character on the lcd screen dependent on it's current x and y coordinates and size
00049     * @param lcd @details Refrence NOKIA 5110 LCD screen object
00050     */
00051     void draw(N5110 &lcd);
00052     /**
00053     * @brief Accessor method gets the current coordinates of the badman character object
00054     @returns Returns the Vector data type holding the  current x and y coordinates of the badman character object's centre
00055 
00056     */
00057     Vector2D getPos();
00058     /**
00059     * @brief Mutator method gets the current x and y coordinate of the badman object to the coordinate passed in the function call
00060     * @param x @details X coordinate value of the new position the badman character object is to move to
00061     * @param y @details Y coordinate value of the new position the badman character object is to move to
00062 
00063     */
00064 
00065     void setPos(int x, int y);
00066     /**
00067     * @brief Accessor method gets the size of badman character object
00068     @returns Returns the size(radius ) of the badman character object
00069 
00070     */
00071     int getSize();
00072 
00073 private:
00074 
00075     int _x;//Integer value representing the x coordinate of the centre of the badman object
00076     int _y;//Integer value representing the y coordinate of the centre of the badman object
00077     int _size;//Integer value representing the radius of the badman character object
00078 };
00079 #endif