34 lines
518 B
C++
34 lines
518 B
C++
#pragma once
|
|
|
|
#include "Engine.h"
|
|
#include "GameField.h"
|
|
#include "IBlock.h"
|
|
|
|
class Tetris : public Engine
|
|
{
|
|
private:
|
|
GameField m_GameField;
|
|
|
|
Figure* m_Figure = nullptr;
|
|
|
|
bool m_End = false;
|
|
|
|
const size_t m_Width = 14;
|
|
const size_t m_Height = 26;
|
|
|
|
int m_Score = 0;
|
|
|
|
public:
|
|
Tetris();
|
|
|
|
~Tetris() override;
|
|
|
|
protected:
|
|
bool end() const override;
|
|
|
|
void on_button_press(int button) override;
|
|
|
|
void update(int dt) override;
|
|
|
|
void render(PaintDevice& paintDevice) override;
|
|
}; |