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: Bullets/Bullets.cpp
- Revision:
- 12:c557b6c9b17a
- Parent:
- 9:62fe47a1374f
- Child:
- 14:2d7e41f46879
--- a/Bullets/Bullets.cpp Sun May 24 21:21:26 2020 +0000
+++ b/Bullets/Bullets.cpp Mon May 25 17:22:06 2020 +0000
@@ -1,22 +1,11 @@
#include "Bullets.h"
Serial pcb(USBTX, USBRX);
-Bullets::Bullets(int ex, int wy, Direction d)
+Bullets::Bullets(int ex, int wy, int d)
{
_dir = 0;
_x = ex;
_y = wy;
- if (d == N) {
- _dir = 0;
- }
- else if (d == E) {
- _dir = 1;
- }
- else if (d == S) {
- _dir = 2;
- }
- else if (d == W) {
- _dir = 3;
- }
+ _dir = d;
//pcb.printf("Direction = %d", _dir);
}