Untitled
unknown
plain_text
a year ago
663 B
11
Indexable
#pragma once
#include <SFML/Graphics.hpp>
struct Point {
int x, y;
};
class Tetromino {
public:
Tetromino();
void reset(int color, int type, const int figures[7][4]);
void rotate();
void move(int dx, int dy);
bool checkCollision(int field[23][10]) const;
void draw(sf::Sprite &sprite, sf::RenderWindow &window) const;
Point a[4], b[4], c[4];
int colorNum;
int nextColorNum;
int nextTemo;
float timer;
float delay;
bool gameOver;
private:
void setFigure(int type, int offset);
bool check() const;
bool isDraw() const;
bool checkI() const;
bool checkO() const;
int figures[7][4];
};Editor is loading...
Leave a Comment