Version of Robotron arcade game using LPC1768, a Gameduino shield, a serial EEPROM (for high scores), two microswitch joysticks and two buttons plus a box to put it in. 20 levels of mayhem.
Dependencies: 25LCxxx_SPI CommonTypes Gameduino mbed
Diff: BulletVelocityCalculator.h
- Revision:
- 7:e72691603fd3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BulletVelocityCalculator.h Sat Jun 08 16:44:54 2013 +0000 @@ -0,0 +1,33 @@ +/* + * SOURCE FILE : BulletVelocityCalculator.h + * + * Definition of class BulletVelocityCalculator. + * Used to calculate the horizontal and vertical velocities necessary for a bullet to + * hit a target, + * + */ + +#ifndef BulletVelocityCalculatorDefined + + #define BulletVelocityCalculatorDefined + + #include "Types.h" + + class BulletVelocityCalculator { + + public : + + /*******************************/ + /* CALCULATE BULLET VELOCITIES */ + /*******************************/ + // Pass distances to target in dx and dy. + // Pass velocity at which bullet moves in v. + // Horizontal and vertical velocities returned in variables pointed to by hv and vv. + static void CalculateVelocities( Int16 dx, Int16 dy, Int16 v, Int16 *hv, Int16 *vv ); + + }; + +#endif + +/* END of BulletVelocityCalculator.h */ +