Kern Fowler / Mbed 2 deprecated Donkey_Kong_Game

Dependencies:   mbed

Revision:
29:be053907f5c7
Parent:
23:ecb74e52163d
diff -r 10937e02a0d6 -r be053907f5c7 lib/Instructions/Instructions.h
--- a/lib/Instructions/Instructions.h	Thu May 09 00:45:42 2019 +0000
+++ b/lib/Instructions/Instructions.h	Thu May 09 00:47:23 2019 +0000
@@ -16,7 +16,7 @@
 
 public:
 /** Instructions Constructor 
-@brief Builds my default Instructions constructor.
+@brief Builds my default Instructions contructor.
 @details This does not have any setup. 
 */
 Instructions();
@@ -32,6 +32,29 @@
 *@param pad The Gamepad class is used.
 *@param lcd The N5110 class is used.
 *@details Prints various text to screen relating to how to play the game.
+*@code
+void Instructions::instructions_run(Gamepad &pad, N5110 &lcd) {
+    wait_ms(250);
+    while (pad.check_event(Gamepad::BACK_PRESSED) == false) { // Continues to show this screen until BACK button pressed.
+        //printf("Instructions State");
+        lcd.clear();
+        lcd.printString("Instructions",7,0);
+        lcd.printString("Move DonkeyKong",0,2);
+        lcd.printString("left or right",0,3);
+        lcd.printString("to collect ",0,4);
+        lcd.printString("Bananas",0,5);
+        lcd.refresh();
+        wait(4); // Changes to next screen after 4 seconds.
+        lcd.clear();
+        lcd.printString("Instructions",7,0);
+        lcd.printString("Avoid the ",0,2);
+        lcd.printString("falling ",0,3);
+        lcd.printString("Barrels ",0,4);
+        lcd.refresh();
+        wait(4); // Loops through both screens. 
+    }
+}
+@endcode
 */
 void instructions_run(Gamepad &pad, N5110 &lcd);
 };