Untitled
unknown
plain_text
a year ago
564 B
8
Indexable
#ifndef TETROMINO_H
#define TETROMINO_H
#include <SFML/Graphics.hpp>
const int figures[7][4] = {
{1, 3, 5, 7}, // I
{2, 4, 5, 7}, // Z
{3, 5, 4, 6}, // S
{3, 5, 4, 7}, // T
{2, 3, 5, 7}, // L
{3, 5, 7, 6}, // J
{2, 3, 4, 5} // O
};
struct Point {
int x, y;
};
class Tetromino {
public:
Point a[4], b[4], c[4];
int colorNum, nextColorNum, nextTemo;
Tetromino();
void generateNext();
bool checkCollision(int field[23][10]);
void rotate();
void move(int dx);
void drop();
};
#endif // TETROMINO_HEditor is loading...
Leave a Comment