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 FATFileSystem
Diff: CaMove/CaMove.cpp
- Revision:
- 13:95323e0f2fcb
- Parent:
- 10:4fda7b01484a
- Child:
- 14:165fff6d1854
--- a/CaMove/CaMove.cpp Sun May 05 19:32:58 2019 +0000 +++ b/CaMove/CaMove.cpp Mon May 06 02:40:07 2019 +0000 @@ -176,7 +176,7 @@ void CaMove::chase(N5110 &lcd, int girl) { int increment; if (girl == 2) { - increment = 1; + increment = 2; } else { increment = 3; } @@ -185,10 +185,11 @@ _cv = _cv + increment; } else if (_cv > _v) { _cv = _cv - increment; - } else if (_ch < _h) { - _ch = _ch + 3; + } + if (_ch < _h) { + _ch = _ch + increment; } else if (_ch > _v) { - _ch = _ch - 3; + _ch = _ch - increment; } if (girl == 2) { Bitmap::renderBMP(AIC[_itr],lcd,_ch,_cv);