Untitled
unknown
plain_text
10 months ago
564 B
5
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_H
Editor is loading...
Leave a Comment