A simple asteroids-like game utilizing various Mbed-compatible sensors
Dependencies: mbed 4DGL-uLCD-SE PinDetect
AbsAst.cpp@0:f2cc64948895, 2018-11-30 (annotated)
- Committer:
- sralph3
- Date:
- Fri Nov 30 04:49:11 2018 +0000
- Revision:
- 0:f2cc64948895
.
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 | } |