////////////////////////////////////////////////////////////////////////////////
//
// File: competition.h
//
// Description:
//
// Author: Capt. Mike LeSauvage
//
// Revision History: 6 Mar 2006 - Created
//                   1 Aug 2006 - Many revisions over the last month have
//                                been made, but all comments were put in
//                                competition.c.  Of note is the standardization
//                                of weapon constants, the creation of a new
//                                weapon structure (for fired weapons), changes
//                                to the old weapon structure for a weapon on a
//                                robot (now called WEAPON_SYSTEM) and the
//                                addition of the platform-specific constants.
//                   6 Sep 2006 - Removed robot centering constants.  Robots are
//                                now centered in their shield bitmap
//                                dynamically based on robot image sizes.
//                                Note this expects robot images to be an ODD
//                                number of pixels in each dimension to appear
//                                centered!
//                              - New constant MIN_RANDOM_DIST added to enhance
//                                random start locations.
//                  10 Apr 2007 - New constants in speed section related to
//                                turbo boost feature. This also changed the
//                                sounds constants.
//                                Changed constant BUMP_LASER so it would be
//                                felt by the bump sensor.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef COMPETITION_HEADER            //Protect competition header with
#define COMPETITION_HEADER 1          //preprocessor directives as it is
//included in multiple files.
#include "ll.h"                      //Linked list library.
#include "variable.h"

//Interfaces to set up the game.
void Fight();
void InitCompetition();
void InitSounds();
void RegisterRobot(char *robotName, ROBOTCOLORS color,
		void (*robotActions)(int), void (*configureRobot)(void),
		char *customImage, int x, int y, float heading);
int AddSensor(int port, SENSORTYPE type, int angle, int width, int range);
void EndCompetition();
void Loading(t_LL listOfRobots);

//Interfaces to control the robot.
void SetMotorSpeeds(int motorASpd, int motorBSpd);
int TurboBoost(void);
int IsTurboOn(void);
int GetGPSInfo(GPS_INFO *gpsData);
int GetSensorData(int port);
void SetSensorStatus(int port, int status);
int FireWeapon(WEAPONTYPE type, int heading);
float GetSystemEnergy(SYSTEM type);
void SetSystemChargeRate(SYSTEM type, int rate);
int SetSystemChargePriorites(SYSTEM priorities[NUM_ENERGY_SYSTEMS]);
int GetBumpInfo(void);
int GetGeneratorStructure(void);
int GetGeneratorOutput(void);
void SetStatusMessage(char *message);

//Other useful interfaces.
void AbortOnError(char *message);
float GetRandomNumber(int upperBound);

#endif                                           //End header file "protection".
