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

PlayerName.h

Committer:
RichardE
Date:
2013-06-17
Revision:
18:70190f956a24
Parent:
0:5fa232ee5fdf

File content as of revision 18:70190f956a24:

/*
 * SOURCE FILE : PlayerName.h
 *
 * Definition of class PlayerName.
 * Contains the name that appears in a high score table for example.
 *
 */

#ifndef PlayerNameDefined

  #define PlayerNameDefined

  #include "Types.h"
  
  class PlayerName {

  public :

    enum {
      Length = 3,      // Number of characters used for name.
      MinChar = ' ',   // First valid character in a name.
      MaxChar = 'Z',   // Last valid character in a name.
    };
  
    // Characters that make up the name, plus a zero char at the end.
    char Name[ Length + 1 ];
    
    /***************/
    /* CONSTRUCTOR */
    /***************/
    PlayerName();

    /**************/
    /* DESTRUCTOR */
    /**************/
    virtual ~PlayerName();

    /************************************************************/
    /* COPY ONE NAME TO ANOTHER WITHOUT CREATING A NEW INSTANCE */
    /************************************************************/
    // Pass pointer to name to copy to in dest.
    void CopyTo( PlayerName *dest ) const;
    
  };

  
#endif

/* END of PlayerName.h */