Tetris/map.hpp
2014-11-07 20:47:50 +01:00

30 lines
450 B
C++

#ifndef MAP_HPP_INCLUDED
#define MAP_HPP_INCLUDED
#include <iostream>
#include <SDL/SDL.h>
#include "resource.hpp"
#include "part.hpp"
#include "global.hpp"
class map
{
private:
int data[HEIGHT][WIDTH];
public:
map();
void reset();
bool isCollision ( part Part, bool strict = false );
void addPart ( part Part );
void applyGravity ( int h );
int destroyLines();
bool isFull();
void draw ( SDL_Surface * screen );
};
#endif