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

LevelCollection.h

Committer:
RichardE
Date:
2013-06-17
Revision:
18:70190f956a24
Parent:
10:bfa1c307c99d

File content as of revision 18:70190f956a24:

/*
 * SOURCE FILE : LevelCollection.h
 *
 * Definition of class LevelCollection.
 *
 */

#ifndef LevelCollectionDefined

  #define LevelCollectionDefined
  
  #include "Types.h"
  #include "Level.h"

  class LevelCollection {

  public :

    enum {
      AttractLevel = 0,        // just ticking over encouraging player to start
      FirstNormalLevel = 1,    // first real level excluding attract mode
    };
    
    /***************/
    /* CONSTRUCTOR */
    /***************/
    LevelCollection();

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

    /************************/
    /* GET NUMBER OF LEVELS */
    /************************/
    UInt8 GetLevelCount( void ) const;

    /***************/
    /* GET A LEVEL */
    /***************/
    // Pass level number in levelNumber.
    // Returns pointer to level or NULL if no such level.
    // Note that the level MAY be dynamically allocated and you must
    // call FreeLevel when you have finished with the level to release
    // memory used.
    Level *GetLevel( UInt8 levelNumber );
    
    /*******************************/
    /* FREE MEMORY USED BY A LEVEL */
    /*******************************/
    // Pass pointer to a level.
    // Frees memory used by level.
    void FreeLevel( Level *level );
    
  };

#endif

/* END of LevelCollection.h */