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
Diff: PlayerName.h
- Revision:
- 0:5fa232ee5fdf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PlayerName.h Tue Jun 04 20:16:33 2013 +0000 @@ -0,0 +1,50 @@ +/* + * 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 */ +