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
Human/human.h@4:402c27b212c1, 2017-05-05 (annotated)
- Committer:
- weixitao
- Date:
- Fri May 05 12:53:09 2017 +0000
- Revision:
- 4:402c27b212c1
- Parent:
- 3:dd4678a85a1a
Project_Bomb
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| weixitao | 1:83459533ff72 | 1 | #ifndef HUMAN_H |
| weixitao | 1:83459533ff72 | 2 | #define HUMAN_H |
| weixitao | 1:83459533ff72 | 3 | |
| weixitao | 1:83459533ff72 | 4 | #include "mbed.h" |
| weixitao | 1:83459533ff72 | 5 | #include "N5110.h" |
| weixitao | 1:83459533ff72 | 6 | #include "Gamepad.h" |
| weixitao | 4:402c27b212c1 | 7 | /** |
| weixitao | 4:402c27b212c1 | 8 | @brief human class for Bomb. Produce a human and it can move by joystick |
| weixitao | 4:402c27b212c1 | 9 | @author Weixi Tao |
| weixitao | 4:402c27b212c1 | 10 | @date 2 May 2017 |
| weixitao | 4:402c27b212c1 | 11 | */ |
| weixitao | 1:83459533ff72 | 12 | class human |
| weixitao | 1:83459533ff72 | 13 | { |
| weixitao | 1:83459533ff72 | 14 | public : |
| weixitao | 1:83459533ff72 | 15 | |
| weixitao | 4:402c27b212c1 | 16 | /** Print human * |
| weixitao | 4:402c27b212c1 | 17 | * Prints a human to the screen buffer. String is cut-off after the 83rd pixel. |
| weixitao | 4:402c27b212c1 | 18 | * @param humanX - the column number of human which is 3 |
| weixitao | 4:402c27b212c1 | 19 | * @param humanY - the row number of human which is 6 */ |
| weixitao | 1:83459533ff72 | 20 | void print_human(); |
| weixitao | 1:83459533ff72 | 21 | double humanX(); |
| weixitao | 1:83459533ff72 | 22 | double humanY(); |
| weixitao | 1:83459533ff72 | 23 | |
| weixitao | 1:83459533ff72 | 24 | private: |
| weixitao | 1:83459533ff72 | 25 | |
| weixitao | 1:83459533ff72 | 26 | int x; |
| weixitao | 1:83459533ff72 | 27 | int y; |
| weixitao | 1:83459533ff72 | 28 | |
| weixitao | 1:83459533ff72 | 29 | |
| weixitao | 1:83459533ff72 | 30 | }; |
| weixitao | 1:83459533ff72 | 31 | |
| weixitao | 1:83459533ff72 | 32 | |
| weixitao | 1:83459533ff72 | 33 | #endif |