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
TanksEngine/TanksEngine.cpp
- Committer:
- el17mcd
- Date:
- 2019-04-09
- Revision:
- 7:a3ccabdebe2e
- Child:
- 11:4e2eb64031a0
File content as of revision 7:a3ccabdebe2e:
/* 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;
}