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.
Diff: Friendly.cpp
- Revision:
- 6:378b5d29e9cf
- Parent:
- 5:0cd7f779418a
- Child:
- 7:ac97bd2f5b1a
diff -r 0cd7f779418a -r 378b5d29e9cf Friendly.cpp --- a/Friendly.cpp Sat Apr 01 11:44:15 2017 +0000 +++ b/Friendly.cpp Mon Apr 03 12:39:35 2017 +0000 @@ -39,6 +39,18 @@ _x-=_speed; } else if (d == E) { _x+=_speed; + } else if (d == NW) { + _y-=_speed; + _x-=_speed; + } else if (d == NE) { + _y-=_speed; + _x+=_speed; + } else if (d == SW) { + _y+=_speed; + _x-=_speed; + } else if (d == SE) { + _y+=_speed; + _x+=_speed; } // position check so the ship doesn't go out of bounds