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
Diff: TanksEngine/TanksEngine.cpp
- Revision:
- 7:a3ccabdebe2e
- Child:
- 11:4e2eb64031a0
diff -r 5d57c758c31d -r a3ccabdebe2e TanksEngine/TanksEngine.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/TanksEngine/TanksEngine.cpp Tue Apr 09 17:09:29 2019 +0000
@@ -0,0 +1,28 @@
+/* TanksEngine.cpp
+Game Engine
+9.4.19
+*/
+#include "TanksEngine.h"
+#include "Projectile.h"
+#include "TankL.h"
+/*
+TanksEngine::TanksEngine()
+{
+
+}
+
+TanksEngine::~TanksEngine()
+{
+
+}
+*/
+bool TanksEngine::collision_pl(TankL tl_obj, Projectile proj_obj)
+{
+ for (int i0 = 0; i0 < 4; i0++) {
+ for (int i1 = 0; i1 < 40; i1++) {
+ if (proj_obj.get_hitbox(i0) == tl_obj.get_hitbox(i1)) {return true;}
+ }
+ }
+ return false;
+}
+