Untitled
unknown
plain_text
a year ago
833 B
10
Indexable
#ifndef GAME_H
#define GAME_H
#include <SFML/Graphics.hpp>
#include "Tetromino.h"
#include "Score.h"
class Game {
public:
Game();
void run();
private:
void processEvents();
void update();
void render();
void resetGame();
void checkLines();
sf::RenderWindow window;
sf::Texture t1, t2, t3;
sf::Sprite s, frame;
sf::RectangleShape background;
sf::Font font;
sf::Text scoreText, highScoreText, text1, text2, gameOverText, playAgainText;
sf::RectangleShape gridLines[230];
sf::RectangleShape playfieldBoundary, nextTetrominoBoundary, scoreBoundary, highScoreBoundary;
int field[23][10] = { 0 };
Tetromino currentTetromino, nextTetromino; // Thêm nextTetromino vào đây
Score score;
float timer, delay;
bool gameOver;
sf::Clock clock;
};
#endifEditor is loading...
Leave a Comment