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: FieldGrid.h
- Revision:
- 16:d0b142ba4362
- Parent:
- 15:d8ea0c7b7e64
--- a/FieldGrid.h Sat Jun 15 15:05:19 2013 +0000 +++ b/FieldGrid.h Sat Jun 15 19:27:36 2013 +0000 @@ -44,6 +44,22 @@ return rowCount; } + /*****************************************/ + /* GET CELL AT PARTICULAR ROW AND COLUMN */ + /*****************************************/ + // Pass row number in rowNum. + // Pass column number in columnNum. + // Returns pointer to cell or NULL if cell does not exist. + FieldCell *GetCellAt( UInt8 rowNum, UInt8 columnNum ) { + FieldRow *row = GetRow( rowNum ); + if( row != (FieldRow*)NULL ) { + return row->GetCellAt( columnNum ); + } + else { + return (FieldCell*)NULL; + } + } + private : // Pointer to array of FieldRow objects, one for each row in the grid.