/************************************************************************
ME218A Project: SkeeBall Racer
Date: Fall Quarter
2007
Team Members:
Derrick Jue, Ji Heun Lee, Stephanie Lue, Nathan Parkhill
File Name: SkeeBall_Racer_Main.c
Description: SkeeBall Racer main
************************************************************************/
/*************************
#included libraries *************************/
#include <stdio.h>
#include
<ME218_C32.h>
#include
<timers12.h>
#include <string.h>
#include
"PWMS12.h"
#include
"ADS12.h"
#include "SkeeBall_Racer.h"
#include "LED.h"
/******************************
main trigger ****************************/
#define RUNGAME
/**********************************
main *******************************/
#ifdef RUNGAME
void main(void)
{
unsigned char
winner;
while(1)
{
InitializeGame(); // initialize ports, modules, and game
effects
CheckforPenny(); // look for a penny
winner = RunRace();
// run the race and check for scores until a winner is found
printf("main: winner = %i\r\n",winner);
GameOver(winner); // run the winner specific game over sequence
DispenseGoodies(winner); // dispense the appropriate goodies
Reset(winner);
// reset game - move cars up to start line
}
}
#endif