Kern Fowler / Mbed 2 deprecated Donkey_Kong_Game

Dependencies:   mbed

Committer:
Kern_EL17KJTF
Date:
Wed May 08 23:46:49 2019 +0000
Revision:
20:c4e6941c98e2
Parent:
13:94abfe83a294
Child:
27:167c716e3e9f
Documentation - Donkey Kong Class Complete.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kern_EL17KJTF 10:28575a6eaa13 1 #ifndef DONKEY_H
Kern_EL17KJTF 10:28575a6eaa13 2 #define DONKEY_H
Kern_EL17KJTF 10:28575a6eaa13 3
Kern_EL17KJTF 10:28575a6eaa13 4 #include "mbed.h"
Kern_EL17KJTF 10:28575a6eaa13 5 #include "N5110.h"
Kern_EL17KJTF 10:28575a6eaa13 6 #include "Gamepad.h"
Kern_EL17KJTF 10:28575a6eaa13 7
Kern_EL17KJTF 20:c4e6941c98e2 8 /** External variables used inside and out of the class. */
Kern_EL17KJTF 20:c4e6941c98e2 9 extern int donkeykong_x;
Kern_EL17KJTF 20:c4e6941c98e2 10 extern int donkeykong_y;
Kern_EL17KJTF 20:c4e6941c98e2 11 extern int donkey_kong_speed;
Kern_EL17KJTF 20:c4e6941c98e2 12 extern int donkey_direction;
Kern_EL17KJTF 11:b288d01533cc 13
Kern_EL17KJTF 20:c4e6941c98e2 14 /** Donkey Kong Class
Kern_EL17KJTF 20:c4e6941c98e2 15 *@brief This class is for spawning the player controlled model Donkey Kong.
Kern_EL17KJTF 20:c4e6941c98e2 16 *@author Kern Fowler
Kern_EL17KJTF 20:c4e6941c98e2 17 *@version 1.0
Kern_EL17KJTF 20:c4e6941c98e2 18 *@date May 2019
Kern_EL17KJTF 20:c4e6941c98e2 19 */
Kern_EL17KJTF 20:c4e6941c98e2 20
Kern_EL17KJTF 20:c4e6941c98e2 21 class Donkey {
Kern_EL17KJTF 10:28575a6eaa13 22
Kern_EL17KJTF 20:c4e6941c98e2 23 public:
Kern_EL17KJTF 20:c4e6941c98e2 24 /** Donkey Kong Constructor
Kern_EL17KJTF 20:c4e6941c98e2 25 @brief Builds my default Donkey Kong constructor.
Kern_EL17KJTF 20:c4e6941c98e2 26 @details This does not have any setup.
Kern_EL17KJTF 20:c4e6941c98e2 27 */
Kern_EL17KJTF 20:c4e6941c98e2 28 Donkey();
Kern_EL17KJTF 20:c4e6941c98e2 29 /** Donkey Kong Destructor
Kern_EL17KJTF 20:c4e6941c98e2 30 @brief Builds my default Donkey Kong destructor.
Kern_EL17KJTF 20:c4e6941c98e2 31 @details This does not have any setup.
Kern_EL17KJTF 20:c4e6941c98e2 32 */
Kern_EL17KJTF 20:c4e6941c98e2 33 ~Donkey();
Kern_EL17KJTF 20:c4e6941c98e2 34 // Mutators
Kern_EL17KJTF 10:28575a6eaa13 35
Kern_EL17KJTF 20:c4e6941c98e2 36 /**
Kern_EL17KJTF 20:c4e6941c98e2 37 *@brief Spawns Donkey Kong model.
Kern_EL17KJTF 20:c4e6941c98e2 38 *@param pad The Gamepad class is used.
Kern_EL17KJTF 20:c4e6941c98e2 39 *@param lcd The N5110 class is used.
Kern_EL17KJTF 20:c4e6941c98e2 40 *@details Creates the player controlled unit Donkey Kong, then moves it left or right based on joystick input. Points on collision with bananas. Gameover on collision with barrels.
Kern_EL17KJTF 20:c4e6941c98e2 41 */
Kern_EL17KJTF 20:c4e6941c98e2 42 void donkeykong_movement(Gamepad &pad, N5110 &lcd);
Kern_EL17KJTF 10:28575a6eaa13 43 };
Kern_EL17KJTF 10:28575a6eaa13 44
Kern_EL17KJTF 10:28575a6eaa13 45 #endif