/* Make sure this is imported only once */
#ifndef SCOREBOARDH
#define SCOREBOARDH

/* NOTE: This module controls the use of ports T3-T7 on the C32. 
   Before using any of the functions provided by the module, 
   InitializeScoreboard() must be called.  This module initializes
   the ME218 timer modules to a 1ms clock tick when used.
*/
 
  /* #define TESTMODE */                /* Comment this line out to use it as a module with no main function */
  #define INITIAL_TIME 60		/* The initial time to display on the scoreboard */
  
  /* Public Functions */
  void InitializeScoreboard(void);	/* Initializes the input and output pins on the scoreboard */
                                        /* and resets the scores to 0 and timer to a default time, defined above*/
  int DecrementScoreboardTime(void);	/* Subtracts 1 from the Timer. Returns a 1 if Time is expired, 0 otherwise */
  int IncrementPlayerScore(void);	/* Adds 1 to the Player score. Returns a 1 if maxed out, 0 otherwise */
  int IncrementComputerScore(void);	/* Adds 1 to the COmputer score. Returns a 1 if maxed out, 0 otherwise */
  void SetScoreboardTime(char time[]);  /* Input a new time as a 2 character string of digits e.g. "60"  */
  void updatedisplay(void);		/* Force refreshes the 7 segment displays */
  void updatedisplayfractionally(void); /* Refreshes the 7 segment display every 10 times it's called */

#endif