A simple asteroids-like game utilizing various Mbed-compatible sensors
Dependencies: mbed 4DGL-uLCD-SE PinDetect
AbsAst.cpp@8:137330cfe63d, 2019-01-03 (annotated)
- Committer:
- sralph3
- Date:
- Thu Jan 03 19:56:27 2019 +0000
- Revision:
- 8:137330cfe63d
- Parent:
- 0:f2cc64948895
Jan 3, 2019
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sralph3 | 0:f2cc64948895 | 1 | #include "AbsAst.h" |
sralph3 | 0:f2cc64948895 | 2 | #define SCREEN_MAX 125 |
sralph3 | 0:f2cc64948895 | 3 | #define SCREEN_MIN 1 |
sralph3 | 0:f2cc64948895 | 4 | |
sralph3 | 0:f2cc64948895 | 5 | bool AbsAst::outB(){ |
sralph3 | 0:f2cc64948895 | 6 | if(this->xpos <= SCREEN_MIN || this->xpos >= SCREEN_MAX || this->ypos <= SCREEN_MIN || this->ypos >= SCREEN_MAX){ |
sralph3 | 0:f2cc64948895 | 7 | return true; |
sralph3 | 0:f2cc64948895 | 8 | } |
sralph3 | 0:f2cc64948895 | 9 | else return false; |
sralph3 | 0:f2cc64948895 | 10 | } |