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

BulletVelocityCalculator.h

Committer:
RichardE
Date:
2013-06-17
Revision:
18:70190f956a24
Parent:
7:e72691603fd3

File content as of revision 18:70190f956a24:

/*
 * 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 */