Library to control the Tetris game area

Dependents:   Tetris_Game

Tetris.h

Committer:
el14ja
Date:
2016-04-12
Revision:
4:e4952be370d3
Parent:
3:af0a7a4464e5
Child:
5:16c174ded933

File content as of revision 4:e4952be370d3:

/*Tetris

Library which contains the functions for the game tetris to run on a Nokia N5110 screen

V 1.0 - initial release

Joseph Allison March 2016

#ifndef TMP102_H
#define TMP102_H

*/

#ifndef Tetris_H //header guards to stop the library from being included more than once
#define Tetris_H

#include "mbed.h"
#include "N5110.h"


class Tetris
{

public:

    Tetris();
    
    
    /**
    Creates the game area boarder and writes the Level, score and next text
    */
    void gameSetup();
    
    /**
    Outputs the score, level and next piece onto the left side of the screen
    */
    void gameInfo(int score,int level,int next);
    
    /**
    Clears the game area
    */
    void clearGame();
    
    /**
    Places a game piece on the screen
    @param x - cells horizontal position
    @param y - cells vertical position
    @param shape - the shape that is being placed
    */
    void piecePlace(int x,int y,int shape);
    /**
    Clears a game piece on the screen
    @param x - cells horizontal position
    @param y - cells vertical position
    @param shape - the shape that is being cleared
    */
    void pieceClear(int x,int y,int shape);
    
    /**
    Sets a 3x3  sets a pixel cell in the game area at position (x,y)
    @param x - cells horizontal position
    @param y - cells vertical position
    */
    void gamePixel(int x,int y);
private:

    /**
    Sets a 3x3  clears a pixel cell in the game area at position (x,y)
    @param x - cells horizontal position
    @param y - cells vertical position
    */
    void clearGamePixel(int x, int y);
    
public:


private:


};

#endif