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

Revision:
0:5fa232ee5fdf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PlayerName.cpp	Tue Jun 04 20:16:33 2013 +0000
@@ -0,0 +1,38 @@
+/*
+ * SOURCE FILE : PlayerName.cpp
+ *
+ * Definition of class PlayerName.
+ * Contains the name that appears in a high score table for example.
+ *
+ */
+
+#include "PlayerName.h"
+
+/***************/
+/* CONSTRUCTOR */
+/***************/
+PlayerName::PlayerName() {
+  // Initialise name to all 'X' characters.
+  for( UInt8 i = 0; i < Length; ++i ) {
+    Name[ i ] = 'X';
+  }
+  Name[ Length ] = (char)0;
+}
+
+/**************/
+/* DESTRUCTOR */
+/**************/
+PlayerName::~PlayerName() {
+}
+
+/************************************************************/
+/* COPY ONE NAME TO ANOTHER WITHOUT CREATING A NEW INSTANCE */
+/************************************************************/
+// Pass pointer to name to copy to in dest.
+void PlayerName::CopyTo( PlayerName *dest ) const {
+  for( UInt8 i = 0; i < Length; ++i ) {
+    dest->Name[ i ] = Name[ i ];
+  }
+  dest->Name[ Length ] = (char)0;
+}
+