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
Snake_engine/Snake_engine.h@11:f026cd7d66ee, 2018-05-03 (annotated)
- Committer:
- weiway
- Date:
- Thu May 03 23:53:58 2018 +0000
- Revision:
- 11:f026cd7d66ee
- Parent:
- 10:946a3835a7c7
- Child:
- 12:d45bc5d878ad
snakengine
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| weiway | 10:946a3835a7c7 | 1 | #include "mbed.h" |
| weiway | 10:946a3835a7c7 | 2 | #include "N5110.h" |
| weiway | 10:946a3835a7c7 | 3 | #include "Gamepad.h" |
| weiway | 10:946a3835a7c7 | 4 | #include "Snake.h" |
| weiway | 10:946a3835a7c7 | 5 | #include "Fruit.h" |
| weiway | 10:946a3835a7c7 | 6 | |
| weiway | 10:946a3835a7c7 | 7 | #ifndef SNAKENGINE_H |
| weiway | 10:946a3835a7c7 | 8 | #define SNAKENGINE_H |
| weiway | 10:946a3835a7c7 | 9 | |
| weiway | 10:946a3835a7c7 | 10 | class snake_enging |
| weiway | 10:946a3835a7c7 | 11 | { |
| weiway | 10:946a3835a7c7 | 12 | public: |
| weiway | 10:946a3835a7c7 | 13 | snake_engine(); |
| weiway | 10:946a3835a7c7 | 14 | ~snake_engine(); |
| weiway | 10:946a3835a7c7 | 15 | void init(); |
| weiway | 10:946a3835a7c7 | 16 | void draw(N5110 &lcd); |
| weiway | 10:946a3835a7c7 | 17 | void update(Gamepad &pad); |
| weiway | 10:946a3835a7c7 | 18 | void read_input(Gamepad &pad); |
| weiway | 11:f026cd7d66ee | 19 | |
| weiway | 11:f026cd7d66ee | 20 | |
| weiway | 11:f026cd7d66ee | 21 | |
| weiway | 11:f026cd7d66ee | 22 | private: |
| weiway | 11:f026cd7d66ee | 23 | void print_point;(N5110 &lcd); |
| weiway | 11:f026cd7d66ee | 24 | Direction _d; |
| weiway | 11:f026cd7d66ee | 25 | Snake s; |
| weiway | 11:f026cd7d66ee | 26 | Fruit f; |
| weiway | 11:f026cd7d66ee | 27 | float _mag; |
| weiway | 11:f026cd7d66ee | 28 | |
| weiway | 11:f026cd7d66ee | 29 | }; |
| weiway | 10:946a3835a7c7 | 30 | |
| weiway | 11:f026cd7d66ee | 31 | #endif |
| weiway | 10:946a3835a7c7 | 32 | |
| weiway | 10:946a3835a7c7 | 33 | |
| weiway | 10:946a3835a7c7 | 34 |